Jabref: The generated BibTeX keys of two different imported entries are not unique?!!

Created on 26 Mar 2017  路  16Comments  路  Source: JabRef/jabref

JabRef version 3.8.2 on Windows 7

Steps to reproduce:

  1. Import these three articles with different DOI
    10.1103/PhysRevB.87.195439
    10.1103/PhysRevB.87.205427
    10.1209/0295-5075/102/27001
  2. check the BibTeX keys of them, they are the same
  3. Now, can not use Latex editor to cite them separately.
keygenerator bug 馃悰

Most helpful comment

I had a look in the code and infact JabRef does not enforce unique bibtex keys for entries.

Possible fix: org.jabref.gui.Basepanel.insertEntry() (line 1180) should check for duplicate keys and automatically append a letter to the bibtex key.

Other fix: When importing entries using a fetcher automatically generate a key with the JabRef Key generator.

@JabRef/Developers what do you think about this matter?

All 16 comments

Thank you for your report, I can confirm this with current master 9205a024e04955abb43e28ef29b62e438e9caf06.
Indeed, this should not happen.

I had a look in the code and infact JabRef does not enforce unique bibtex keys for entries.

Possible fix: org.jabref.gui.Basepanel.insertEntry() (line 1180) should check for duplicate keys and automatically append a letter to the bibtex key.

Other fix: When importing entries using a fetcher automatically generate a key with the JabRef Key generator.

@JabRef/Developers what do you think about this matter?

I would say that the fetcher should automatically generate a new key, since the key delivered from the fetchers is often meaningless / adheres to the convention of the provider not the user.
Maybe this can be combined with https://github.com/JabRef/jabref/issues/1283.

I did the import with a snapshot from 7 days ago. It work well using the new entry->DOI ->generate way.
No duplicates. Maybe you should explain where you import from?

I tried http://dx.doi.org/10.1103/PhysRevB.87.195439 and http://dx.doi.org/10.1103/PhysRevB.87.205427. The BibTeX there have different keys. @alshehab211 could you state how you imported the entries, please?

@koppor uhm? Have you tried to download them via the new entry dialog? For me this is still as @alshehab211 reports it.

@koppor using the New BibTex entry in Jabref with ID type: DOI

I can confirm the issue in the latest master:
I inserted them using the "+" Icon-Button in the toolbar, and then copy pasting the doi-url (including the http prefix)
grafik

@bernhard-kleine Yes, the two entries are not identified as duplicates but JabRef import them with the same BibTeX keys.

So short poll which solution from https://github.com/JabRef/jabref/issues/2687#issuecomment-289283811 should be implemented:

  • Check for duplicates and append a letter such that the second entry would be Van_Duppen2013a
  • Automatically generate a key with the JabRef Key generator each time a fetcher is used.

This problem is arising when the first author has more than an article in the same year?!

@alshehab211 Not particularly. We use a fetcher which at the moment just copies the key from the database which is queried. If this database contains any duplicate keys they are imported as they come.

@lynyus which database? if you can see the pages also are not imported for the mentioned entries?! (10.1103/PhysRevB.87.195439 & 10.1103/PhysRevB.87.205427) although the pages no. present in the BibTex in the journal database?!

@alshehab211 it's from doi.org, nevertheless, when we call the download method in DoiFetcher#55, the entry already has the other key format.

When will the updated version of jabref be released where this error is fixed?

We have not yet a clear roadmap for the release of 4.0. Since a lot has changed in the new version, we will probably release an alpha / beta version first. Until then you may try out the latest development version from http://builds.jabref.org/master/, but please be aware that this version might have some issues and prepare accordingly with backups of your bib files etc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lenhard picture lenhard  路  4Comments

Braunch picture Braunch  路  3Comments

jonasstein picture jonasstein  路  3Comments

LinusDietz picture LinusDietz  路  3Comments

tobiasdiez picture tobiasdiez  路  4Comments