Skip to content

hackathon bug fixes - #2537

Merged
xsrust merged 2 commits into
developmentfrom
hackathon-fixes
Jun 4, 2020
Merged

hackathon bug fixes#2537
xsrust merged 2 commits into
developmentfrom
hackathon-fixes

Conversation

@briri

@briri briri commented Jun 2, 2020

Copy link
Copy Markdown
Contributor
  • Update to plan permissions to allow an ApiClient to retrieve publicly visible plans
  • Fixed an issue in the plans_controller when the contributor identifier does not map to an IdentifierScheme (e.g. { type: "other", identifier: "12345" })
  • Fixed contributor deserializer which referenced roles instead of role
  • Added a nil check to the funding deserializer to allow empty grant_id
  • Added a distribution to the dataset in the JSON output that contains the download_url which points to the plans pdf export url
@briri
briri requested a review from xsrust June 2, 2020 20:47

@xsrust xsrust left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pulling together those fixes

Comment on lines +15 to +22
json.distribution [plan] do |distribution|
json.title "PDF - #{distribution.title}"
json.data_access "open"
json.download_url plan_export_url(distribution, format: :pdf)
json.format do
json.array! ["application/pdf"]
end
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, a link to our export

email_subject = _('Query or feedback related to %{tool_name}') %{ :tool_name => tool_name }
user_name = User.find_by(email: @resource.email).nil? ? @resource.email : User.find_by(email: @resource.email).name(false)
inviter_name = @resource.is_a?(User) ? @resource.invited_by.name(false) : @resource.invited_by.name
inviter_name = @resource.invited_by.name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of accounts generated by API clients, what name gets put for the inviter_name or invited_by record?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. would be the name of the system api_clients.name. Maybe we should add a separate field for them that store a suitable name or a message.

@xsrust
xsrust merged commit 3d293ae into development Jun 4, 2020
@briri
briri deleted the hackathon-fixes branch June 4, 2020 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants