A way to map group library item keys to My Library keys?

Is there a way to record what new key a local item gets when it's added to a group, and produce a list of paired keys, so one can map the group library items to My Library items by key?

Note that I'm not asking about syncing changes to items between libraries, or anything like that, only about keeping tracks of what items are copies of each other across libraries.

Use case: I've written some drafts on a topic. I get together with colleagues on a project. We make a Group, and I add my references. I'd like to share my drafts as well, for others to mangle, but the existing references are keyed to my local Zotero library. I'd like to update my drafts so the references are keyed to our shared Group library instead.

(Side question: Is something like that handled by the word processor plugins already? I imagined having to search/replace in document source, which is fine with me, but perhaps there's an easier way.)
  • I think something like that may be possible with some light scripting, but it's later here & I don't want to tell you something wrong while half-asleep.
    What I _can_ tell you is that you can still share your draft, as the entire citation data is, by default, stored in the document. When other people open that draft, they'll still be able to see those references, even change their citation style etc. The one thing you need to be careful for in this scenario is that any future insertions of the items tied to your library must be from the list of cited items the quick format bar of the word processor plugin gives you. You don't want them to be from the group library.
  • edited October 14, 2013
    Right, thanks. But then, what if other people insert something from the group library, something that originally stems from my collection, and send the document back to me...? I guess we'd have to try it and see, I don't have much experience with this.

    If you have pointers on scripting a solution, I'd really appreciate it. (Sometime you're awake again, of course.)

    PS. Thanks for the super fast reply!
  • as long as the item from the group library isn't a duplicate of something that's already cited in the document that's no problem. A document can have citations from different libraries.
    I'll have a look at the group ID later on, though maybe Aurimas knows this right away.
  • I'm not sure I follow. What is the problem with inserting references from both group and personal libraries? Granted, as adamsmith said, that you do not insert the same reference (in two different places) from both group _and_ personal libraries, which would then be treated as two separate references, rather than one.

    I suppose that is the issue you are trying to circumvent? IMO, it wouldn't be too hard to find this in an author-date style. It's fairly easy to find two identical references when they are next to each other. For a numbered style, that would be much more difficult though.

    In general, you can easily see which of the references are coming from which library by triggering field codes in Word (Alt + F9). Group libraries will have a uri that starts with http://zotero.org/groups/ and personal item libraries will start with http://zotero.org/users/. You can search through the document to verify that there are no group library items. Fixing this (i.e. remapping group items to personal items and vice versa) is not that trivial, though certainly possible, because Zotero keeps track of personal <-> group library item relationships in the sqlite database.

    What OS are you on (or have access to)? The remapping may be easier on Linux or Mac than on Windows.
  • BTW, the problem with re-mapping an item from one library to another, is that they are not guaranteed to actually be the same. It shouldn't happen normally, but at least in theory the following could mean trouble:

    You create an item in your personal library titled "Item A". You move the item to a group library. At this point, remapping wouldn't be a problem. But now, someone renames "Item A" to "Item B" in the group library. Then they cite "Item B" in the document. You remap group items to personal items and "Item B" in text changes to "Item A".

    As I said, normally this would not happen, but one reasonable case is book section references. If you want to create a reference to a book section ("Section A") and you already have a reference to another section ("Section B") in that book, it is very convenient to create a duplicate of "Section B", which copies all the metadata relevant to the book itself (but does not copy personal <-> group item relationships), and then change the title and section authors. The problem is that, when you create a duplicate of "Section B", you have two "Section B" references and it is not immediately obvious which one is the original (though you can tell by looking at the date created). So the "wrong" reference could be modified, which would then lead to a problem described above.
  • Thanks for clarifying -- I hadn't thought it through, but now I see that this should be much less of an issue than I imagined. So different libraries can be freely mixed. Others can make use of references to my personal library thanks to the embedded citation data. And it should be easy to fix any collisions that arise if the same work is referenced from both group and personal library. (I'm on Mac OSX, using Zotero with LibreOffice and an Emacs setup.)

    Thanks also for pointing out that the sqlite database already tracks these relationships. I hadn't realized that, but now I've had a look.

    In the "relations" table, the lines with "sameAs" predicate appear to record precisely the information I wanted.

    That's reassuring if I ever *do* want to remap my references, though judging from the above, I'm unlikely to need to.
  • One more thing, if you need to edit metadata for a reference, you would obviously have to figure out which library to edit the item in.
  • Yes, clearly. If I move a well-defined part of my library into a Group, and expect all further editing and additions to be made in the group library, might it actually make sense to delete the original items from my personal library, to keep things tidy? But perhaps that's a question for a different thread.
  • That's completely up to you. It all depends on how you organize your library.

    In general, I would say that if you are planning to collaborate on a document, it's best to start by creating a group library before you insert a bunch of references. Perhaps it would make sense for Zotero to make the transition between writing with your personal library and collaborating with others more seamless. I'll have to think about this some more.
  • Starting with a group library from the beginning would clearly be best, but sometimes you start dabbling in a field on your own, without foreseeing that it will lead you into collaboration.

    I expect it's all manageable with good habits on the user side, though, so I'm not clamoring for new features.

    The current arrangement with independent, redundant copies of items in different libraries certainly has the virtue of keeping data safe. And the option of having different metadata for the same work in different libraries might also sometimes be a useful feature, not just a source of potential confusion.
  • Yes, having the option to link references from personal library and group one to avoid duplicates (as with collections) would be great.
  • Hi folks, it's almost 4 years later and I have a question regarding the issue "insert the same reference (in two different places) from both group _and_ personal libraries, which would then be treated as two separate references, rather than one." described by aurimus on Oct. 14, 2013.

    As aurimus noted "Fixing this (i.e. remapping group items to personal items and vice versa) is not that trivial, though certainly possible, because Zotero keeps track of personal <-> group library item relationships in the sqlite database."

    I'm wondering if there has been anything done on this so as to deal with the potential problems?

    BTW I'm using Z5 with MacOS 10.12.6
Sign In or Register to comment.