DSpace
DSpace copied to clipboard
Datacite DOI not working when the identifiers submission step isn't used
Describe the bug
Enable the DOI datacite registration but don't enable the "identifiers" step. Leave all options as the default. Submit an item with at least one file & look at the DOI table. It will be empty, so no DOI will be registered.
This is because the default "doi-filter" has an "is-archived_condition" BUT when the registration mechanism kicks in the item isn't archived yet !
Identifier registration code: https://github.com/DSpace/DSpace/blob/main/dspace-api/src/main/java/org/dspace/content/InstallItemServiceImpl.java#L75-L86 Setting the item to archived: https://github.com/DSpace/DSpace/blob/main/dspace-api/src/main/java/org/dspace/content/InstallItemServiceImpl.java#L216
I don't know what the best way to fix it would be, do we call on the setArchived(true) BEFORE we pass things on to the identifiers ? Because the finishItem() method expects a handle to be there.
To Reproduce Steps to reproduce the behavior:
- Enable the "org.dspace.identifier.DOIIdentifierProvider" in the identifier-service.xml
- Start a new submission & archive it
- Check the DOI table after, no DOI will be found in the table
Expected behavior A DOI should be registered.
Related work
This MIGHT be related to: https://github.com/DSpace/DSpace/issues/9403 (It might not have been visible because of the pre-registration always happening there ?)
@pnbecker what are your thoughts here on Kevin's question, cfr:
I don't know what the best way to fix it would be, do we call on the setArchived(true) BEFORE we pass things on to the identifiers ? Because the finishItem() method expects a handle to be there.
@bram-atmire you’re right. Please see @kshepherd comment here: https://github.com/DSpace/DSpace/pull/9271#pullrequestreview-1964925474 he suggests to update the default filter
I created a PR: https://github.com/DSpace/DSpace/pull/9619