Incomplete release of deleted item IDs

I've run into a small bug affecting drag-and-drop between libraries. Here's a recipe for reproducing it.

You will need the following items:

- An open Firefox with Zotero installed
- A local collection under My Library
- A group library under Group Libraries, and a group collection within it
- One item in the group collection

Making the bug:

- Drag the item from the group collection to the local collection, and release the mouse button
- Confirm that the item is shown in the local collection
- Right-click on the item in the local collection, select "Delete Selected Item from Library"
- At the prompt ("Are you sure you want to delete the selected item?") click on OK.
- Drag the item from the group collection to the local collection (again), and release the mouse button.
- Observe that the target local collection does not highlight, and that releasing the mouse button does not drop the item into the collection.

Stepping around the bug:

- Click on the Trash collection.
- Right-click over the Trash collection, select "Empty Trash", and click.
- At the prompt ("Are you sure you want to permanently remove items in the Trash?") click on OK.
- Drag the item from the group collection to the local collection (a third time), and release the mouse button.
- Observe that everything works correctly, and that the item now appears in the local collection.
  • Well, it's not really a bug—items in the trash still exist in the library, and, if it did let you drag an item into a library when the same item already existed in the trash, it's not clear what would happen if you then undeleted the original item. I guess one option would be a message warning you that the item already existed as a deleted item, and did you want to replace (and undelete) it?
  • edited October 18, 2009
    Gee, that sounds like something I've seen happening. Current behaviour is absolutely mystifying, so a warning that there is a conflict with items in the trash would be welcome. But what about silently solving the conflict by simply removing those items from Trash? If the user is dragging them from the group library, can we not be sure he wants to copy them anew from there and isn't going to care about undeleting any previous instantiation?
  • Agreed that "bug" is maybe too strong a word, but it can be puzzling. I nearly gave up, because at first I thought I had done something to the item itself between the first and the second drag-and-drop that prevented copying (I had set "copy notes and attachments" in Preferences).

    In my case, I would have wanted to finalize the deletion from the library, and copy in the new item, and mark's suggestion of just wiping out the existing item would have worked just fine. But ...

    It's a tricky one, isn't it. The copy lurking in trash could have edits or attachments that the user wants to retain, and that conflict with state of the copy he's aiming to drag in from elsewhere. Seems like (as Dan suggests) offering to restore the item from trash, with a warning that the outside item will not be copied in, and that emptying the trash will clear the way for a proper copy action, is about as far as it's safe to go. That way nothing gets deleted without the user going through the usual steps to effect a complete delete and purge. It would also provide a little reminder that the trash should be emptied from time to time. :)

    In my case, I would have had to back out and empty the trash, and then copy the item across afresh with its attachment (just as I did do), but I would have known what to do at each step, and had an opportunity to compare and think about the state of the source and target items.
Sign In or Register to comment.