You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a DOI is created via REST API via JSON, the schemaVersion attribute is not populated and is returned as nil. When the DOI metadata is updated, the schemaVersion is correctly populated.
NOTE:
This was first noted in Fabrica. A user would create a DOI via the create form form with the assumption that Fabrica would use an appropriate default, since there was no way for the user to set this value. On going to the update DOI form, there would be a flash message at the top of the screen saying the schema version was out of date, and that on saving the update form, the DOI schema version would be updated to the latest.
The schemaVersion is populated with the relevant schema version of the DOI metadata (currently, http://datacite.org/schema/kernel-4).
Current Behaviour
The schemaVersion is only populated after an update to the DOI metadata.
Steps to Reproduce
Create a DOI via JSON via REST API and check the response and DB values.
Context (Environment)
This results in a Using the Form would update this DOI to the latest schema version. message in Fabrica when updating a DOI using the form that has just been created.
Screenshots
Further details
Proposal
Hypothesis
The schemaVersion does not appear to be set either here:
Describe the bug
When a DOI is created via REST API via JSON, the
schemaVersion
attribute is not populated and is returned asnil
. When the DOI metadata is updated, theschemaVersion
is correctly populated.NOTE:
This was first noted in Fabrica. A user would create a DOI via the create form form with the assumption that Fabrica would use an appropriate default, since there was no way for the user to set this value. On going to the update DOI form, there would be a flash message at the top of the screen saying the schema version was out of date, and that on saving the update form, the DOI schema version would be updated to the latest.
The Fabrica create DOI form has been amended to set the DOI schema version to the latest version in datacite/bracco#829 (Here: https://github.com/datacite/bracco/pull/829/files#diff-c1a0761549c6ea67bce6d2c46f34c97b22927b6d7fadf48f393a00f63fa89952)
Expected Behaviour
The
schemaVersion
is populated with the relevant schema version of the DOI metadata (currently,http://datacite.org/schema/kernel-4
).Current Behaviour
The
schemaVersion
is only populated after an update to the DOI metadata.Steps to Reproduce
Create a DOI via JSON via REST API and check the response and DB values.
Context (Environment)
This results in a
Using the Form would update this DOI to the latest schema version.
message in Fabrica when updating a DOI using the form that has just been created.Screenshots
Further details
Proposal
Hypothesis
The
schemaVersion
does not appear to be set either here:lupo/app/controllers/datacite_dois_controller.rb
Lines 580 to 588 in cde436d
Or here:
lupo/app/lib/params_sanitizer.rb
Lines 451 to 458 in cde436d
Possible Implementation
The text was updated successfully, but these errors were encountered: