4Science / DSpace

This repository contains the 4Science optimized DSpace & DSpace-CRIS distribution.
https://wiki.lyrasis.org/display/DSPACECRIS/
BSD 3-Clause "New" or "Revised" License
42 stars 61 forks source link

entries remain in orcid queue when persons metadata are added and removed. #416

Open floriangantner opened 7 months ago

floriangantner commented 7 months ago

Describe the bug OrcidQueue entries are not removed from the orcid queue when some author has been added and removed in some short time span.

To Reproduce Steps to reproduce the behavior:

  1. Given some Person A with Orcid and common settings enabled for pushing Publications
  2. Add Person A as author to some Publication
  3. Save - OrcidQueueConsumer should create some new orcid entry
  4. Remove Person A as author from Publication
  5. Save - OrcidQueueConsumer should do nothing.
  6. Push to Orcid
  7. The record is falsely pushed to Orcid

Expected behavior For profile entities/sections the values are removed using some checksum/metadata signature. For OrcidEntities (Funding, Publication) there is no equivalent yet.

We expect the OrcidQueue Consumer to check existing OrcidQueue entries for the entity and delete all Insert-Operations where the profile is not found among the metadata authority values anymore.

This can be achieved by some check in consumeEntities https://github.com/4Science/DSpace/blob/fe36309c7a4eda36ecc23eb80b3309a53e96e0b8/dspace-api/src/main/java/org/dspace/orcid/consumer/OrcidQueueConsumer.java#L184 which finds all orcidqueue entries for the entitiy and loops again through the list of metadata.

Related work Should also affect the upstream DSpace implementation