[DuraSpace JIRA] (DS-4446) Add better checks before moving items between collections and remove items from collections

0 views
Skip to first unread message

Pascal-Nicolas Becker (DuraSpace JIRA)

unread,
Feb 28, 2020, 6:55:02 AM2/28/20
to dspace-...@googlegroups.com
Pascal-Nicolas Becker created an issue
 
DSpace / Bug DS-4446
Add better checks before moving items between collections and remove items from collections
Issue Type: Bug Bug
Affects Versions: 6.3
Assignee: Pascal-Nicolas Becker
Components: API
Created: 28/Feb/20 5:54 AM
Fix Versions: 6.4, 7.0
Priority: Minor Minor
Reporter: Pascal-Nicolas Becker

ItemService.move(Context, Item, Collection, Collection, boolean) should have a check if the item is moved into a collection it already belongs to. In such a case DSpace tries to add the item to the collection, but notices that it belongs to this collection already and doesn't add it a second time. Then it tries to remove the item from the old collection.

If an item is removed from a collection, DSpace checks first, if it belongs to one collection only and deletes the item in that case. It does not check if the item belongs to the collection it shall be removed from.

We should add checks if an item is moved into a collection it already belongs to and ignore the move action in that case.

Before an item is removed from a collection we should not check only if the item belongs to one collection only. We should check if it belongs to the collection it shall be removed from at all.

This sounds like a avoiding a miss-use of the API. I ran into the problem, because a browser send a move order again that was already executed before. In that case DSpace deleted the item.

I will prepare a PR against DSpace 6 and 7.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.4.1#804002-sha1:94e96d6)
Atlassian logo

Pascal-Nicolas Becker (DuraSpace JIRA)

unread,
Feb 28, 2020, 6:56:36 AM2/28/20
to dspace-...@googlegroups.com

Pascal-Nicolas Becker (LYRASIS JIRA)

unread,
Jun 3, 2021, 9:25:01 AM6/3/21
to dspace-...@googlegroups.com
Pascal-Nicolas Becker assigned an issue to Unassigned
 
Change By: Pascal-Nicolas Becker
Assignee: Pascal-Nicolas Becker
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Tim Donohue (LYRASIS JIRA)

unread,
Aug 3, 2021, 3:59:01 PM8/3/21
to dspace-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages