Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4446

Add better checks before moving items between collections and remove items from collections

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Received (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.3
    • Fix Version/s: 6.4, 7.0
    • Component/s: API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Not Required

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            pbecker Pascal-Nicolas Becker
            Reporter:
            pbecker Pascal-Nicolas Becker
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: