Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove optional step for DOI creation #150

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Remove optional step for DOI creation #150

merged 3 commits into from
Feb 21, 2025

Conversation

J4bbi
Copy link
Collaborator

@J4bbi J4bbi commented Feb 21, 2025

This PR replaces the PIDField that takes care of getting a DOI for a record (as a side note, the current InvenioRDM version being developed, version 13, has refactored the PIDField component and associated components considerably).

Default behaviour

image

The default behaviour for DOIs is to allow for DOIs through Datacite or external (unmanaged) DOIs - a free text field.

image

The external option is selected by default. Selecting the No radio button disables the input text field and displays a button to "Get a DOI". Clicking the button will submit the submission form with a RESERVE_PID action context.

image

When the form is submitted and internal PID is created, for example d8vn9-t2z67, but the record remains in draft form.
Another request is made to the pids endpoint: /d8vn9-t2z67/draft/pids/doi?expand=1 and the DOI has been reserved. As far as I understand, by reserving the DOI, metadata will be uploaded to Datacite but the DOI won't be published.

New behaviour

The notion of an externally managed DOI is removed from config (see here) and the hard-coded preset default values for the form are overwritten (see here).

image

image

The user can still get and discard a DOI, regardless two DOIs will be created on publication (as DOIs are set as being mandatory in config). This form element merely allows the user to reserve a DOI and use it's value.

Improvements

This PR can be enhanced by improving label/help text and possibly adding a copy value button. Also, adding documentation about this customisation.

I'm not sure how to approach skipping the button altogether. Submitting the form on condition on load doesn't seem straight forward and neither does overwriting the publish button, moreover, the user would not be apply to see the DOI before publication then.

Developer Checklist

Developers should review and confirm each of these items before requesting review

  • Code meets acceptance criteria from issue
  • Unit tests are written and all pass
  • User Test Scripts (if required) are written and have been run through
  • Code documentation and related non-code documentation has all been updated

Reviewer Checklist

Reviewers should review and confirm each of these items before approval
If there are multiple reviewers, this section can be duplicated for each reviewer

  • Code meets acceptance criteria from issue
  • Unit tests are written and all pass
  • User Test Scripts (if required) are written and have been run through
  • Code documentation and related non-code documentation has all been updated
  • Migation has been created and tested

Testing

List user test scripts that need to be run

List any non-unit test scripts that need to be run

@J4bbi J4bbi force-pushed the feature/datacite_dois branch from dd87dd5 to 78531a2 Compare February 21, 2025 09:02
@J4bbi J4bbi requested a review from cc-a February 21, 2025 10:08
@J4bbi J4bbi marked this pull request as ready for review February 21, 2025 10:08
Copy link
Collaborator

@cc-a cc-a left a comment

Choose a reason for hiding this comment

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

Thanks @J4bbi. Looks good.

I'm going to create a separate issue for documenting this that can be actioned once #147 is merged.

@cc-a cc-a merged commit 46ff900 into develop Feb 21, 2025
2 checks passed
@cc-a cc-a deleted the feature/datacite_dois branch February 21, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants