DSpace icon indicating copy to clipboard operation
DSpace copied to clipboard

Datacite DOI not working when the identifiers submission step isn't used

Open KevinVdV opened this issue 11 months ago • 2 comments

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:

  1. Enable the "org.dspace.identifier.DOIIdentifierProvider" in the identifier-service.xml
  2. Start a new submission & archive it
  3. 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 ?)

KevinVdV avatar Mar 19 '24 13:03 KevinVdV

@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 avatar Mar 22 '24 10:03 bram-atmire

@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

pnbecker avatar Mar 28 '24 06:03 pnbecker

I created a PR: https://github.com/DSpace/DSpace/pull/9619

pnbecker avatar Jun 02 '24 13:06 pnbecker