Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#1897 closed enhancement (fixed)

Handle citing the same items from different libraries

Reported by: simon Owned by: simon
Priority: blocker Milestone: 2.1 Final
Component: word integration Version: future
Keywords: Cc: mronkko, fbennett, dstillman

Description

At the moment, an item that has been copied from one library to another will appear twice in the QuickFormat list (once for the copy in each library), and if the user selects the item both from his/her library and the group library, the reference will appear twice in the bibliography. It's very easy to do this, and it's confusing.

Our options are:

  1. Always tie the QuickFormat dialog to a specific library. In this case, the problem wouldn't be any worse than it is with the current add citation dialog.
  1. Tweak the QuickFormat dialog to provide an indication of which items have already been cited, so that duplication is unlikely. Continue to show both items in the list. We would probably need to add an indicator of which library the item is in.
  1. Only show the most recently modified version of the item in the QuickFormat dialog. If we were to do this, we'd need to figure out what happens if one version of an item is cited in the document, and then the user modifies the other version and so cites it instead.
  1. Only pool the items in the QuickFormat dialog and the document if they have the same metadata, picking the most recently modified (?). This might be the best solution. It might also be the most complicated.

Change History (11)

comment:1 Changed 5 years ago by simon

  • Cc mronkko fbennett dstillman added

comment:2 Changed 5 years ago by mronkko

My take on this issue would be to use a combination of 1 and 2.

Option 1: I would prefer the option 1 to be implemented with the patch that I provided in this thread. The patch allows the user to choose a preferred library (and optionally a preferred collection inside the library). This feature defaults to being off because the user needs to explicitly choose the preferred library.

http://forums.zotero.org/discussion/19350/option-to-disable-libraries/

(It is pretty obvious that I prefer this option because I implemented it in the way that I prefer to have it)

Option 2: This could be implemented by showing the already cited items on the top of the list. If there were items that were already cited in the document, there should be a separator before these with the label "items already used in the document" and a separator after the already used items saying "items that have not yet been used". The rest of the items could be sorted by library and then have a similar separator before each library "items found in library XXX"

I am against 3 and 4 because it would be difficult to determine which item should be shown. For example if I had an item in my library that I wanted to use but someone would add a duplicate in a group library, the most recently modified item would change.

comment:3 Changed 5 years ago by mronkko

To add to my previous comment. In my case most often the last edited item would be an incorrect one. Most of the duplicates that we get in our group libraries are because items that already exists in one of the libraries are added again because a person adding the item does not know that the item exists already in that particular or some other group library.

I do not see how Zotero would be able to choose among the duplicates without this being potentially confusing for the user. Thus, in my opinion, the best way to implement this would be to implement the preferred library feature, and the have the select box show the items structured in sections that each have spacer before them explaining what the section is.

1) Items already used in the document
2) Unused items from the preferred collection
3) Unused items from the preferred library
4-N) Unused items from the other libraries shown in the same order as the libraries appear in Zotero

If a section would not contain any items, it would not be displayed. The option number 2 would be useful for large libraries. I typically have a collection for each paper that I write and add there the references that I plan to use. This makes it much faster to find the relevant papers from a larger library (using the classic view).

comment:4 Changed 5 years ago by mronkko

I experimented a little bit with the code and this is the way that I would prefer this worked.

https://github.com/mronkko/zotero/commit/3d928ce55fbeab204748179c7be8ddb3a67f025f

So the items would be shown grouped by libraries and there would be separators between the libraries.

comment:5 Changed 5 years ago by simon

We did 2.

comment:6 Changed 5 years ago by simon

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 5 years ago by mronkko

The current solution helps the problem, but does not address all cases where it happens. I recently worked on a paper with a colleague using a version that includes this new feature. We used a group library for the paper, but both of us had copied our own texts from earlier papers that used our personal libraries into the document. The end result was that the cited items that appeared in the top of the quickformat list contained three identical copies of the same reference without any way of knowing which was from which library.

The patch that I posted here https://groups.google.com/group/zotero-dev/msg/3aa9cbedcce7e491? would solve this problem by automatically replacing items that are known to be duplicates across libraries with one copy from a library that the user chooses or copy these items to the chosen library after which duplicates can be fixed with the duplicate removal feature.

comment:8 Changed 5 years ago by simon

We decided that it's both counterintuitive and complex for the integration dialog to copy items. However, if you want to update this to copy to a collection on demand, we would consider it. Document collections should eventually take care of the issue you point out here.

comment:9 Changed 5 years ago by mronkko

Copying items might be confusing, I agree. This could be removed from the patch and only replace items that already exists in the preferred library. In other words, if a user has chosen to have a preferred library, all citations that used an item that had a duplicate in the preferred library would use the item from the preferred library instead of the an item chosen from another library. If a cited item did not exists in the preferred library, it would be cited using the library that the user used in the insert citation dialog.

"However, if you want to update this to copy to a collection on demand, we would consider it"

Can you elaborate on this? I do not fully understand what you mean.

comment:10 Changed 5 years ago by simon

Instead of automatically copying items between libraries when they're added, we could have an option in the QuickFormat menu or a button in the Set Document Preferences window that would copy referenced items to a selected collection or a new collection in a selected library, and update the URIs in the document so that the first URI is the URI in that collection. Eventually we'd end up replacing this with document collections, though, so I'm not sure if it's worth it.

Version 0, edited 5 years ago by simon (next)

comment:11 Changed 5 years ago by mronkko

The menu option or button that forces all items that cited to be copied to a single library sounds like a good idea, and would solve the problem that I have with the current implementation.

The document collections implementation would need to solve the issue of how items across libraries are merged to be a useful tool to eliminate citing one item from multiple libraries. If I could use the document collections to copy items between libraries and update the URIs in the document, then a separate button for doing that would not be needed.

Note: See TracTickets for help on using tickets.