mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
Merge pull request #9890 from atmire/w2p-118774_fix-doi-deletion-bug
Status of DOI object should be set to TO_BE_DELETED when the related item is removed
This commit is contained in:
@@ -67,6 +67,7 @@ import org.dspace.event.Event;
|
|||||||
import org.dspace.harvest.HarvestedItem;
|
import org.dspace.harvest.HarvestedItem;
|
||||||
import org.dspace.harvest.service.HarvestedItemService;
|
import org.dspace.harvest.service.HarvestedItemService;
|
||||||
import org.dspace.identifier.DOI;
|
import org.dspace.identifier.DOI;
|
||||||
|
import org.dspace.identifier.DOIIdentifierProvider;
|
||||||
import org.dspace.identifier.IdentifierException;
|
import org.dspace.identifier.IdentifierException;
|
||||||
import org.dspace.identifier.service.DOIService;
|
import org.dspace.identifier.service.DOIService;
|
||||||
import org.dspace.identifier.service.IdentifierService;
|
import org.dspace.identifier.service.IdentifierService;
|
||||||
@@ -851,6 +852,7 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
|
|||||||
DOI doi = doiService.findDOIByDSpaceObject(context, item);
|
DOI doi = doiService.findDOIByDSpaceObject(context, item);
|
||||||
if (doi != null) {
|
if (doi != null) {
|
||||||
doi.setDSpaceObject(null);
|
doi.setDSpaceObject(null);
|
||||||
|
doi.setStatus(DOIIdentifierProvider.TO_BE_DELETED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove version attached to the item
|
// remove version attached to the item
|
||||||
|
Reference in New Issue
Block a user