Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The generated BibTeX keys of two different imported entries are not unique?!! #2687

Closed
alshehab211 opened this issue Mar 26, 2017 · 16 comments · Fixed by #2709
Closed

The generated BibTeX keys of two different imported entries are not unique?!! #2687

alshehab211 opened this issue Mar 26, 2017 · 16 comments · Fixed by #2709
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs keygenerator

Comments

@alshehab211
Copy link

alshehab211 commented Mar 26, 2017

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.
@alshehab211 alshehab211 changed the title The generated bibtex keys of the two different imported entries are not unique?!! The generated BibTeX keys of two different imported entries are not unique?!! Mar 26, 2017
@LinusDietz LinusDietz added bug Confirmed bugs or reports that are very likely to be bugs keygenerator labels Mar 26, 2017
@LinusDietz
Copy link
Member

LinusDietz commented Mar 26, 2017

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

@LinusDietz
Copy link
Member

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?

@tobiasdiez
Copy link
Member

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 #1283.

@bernhard-kleine
Copy link

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?

@koppor
Copy link
Member

koppor commented Mar 30, 2017

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?

@LinusDietz
Copy link
Member

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

@alshehab211
Copy link
Author

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

@Siedlerchr
Copy link
Member

Siedlerchr commented Mar 30, 2017

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

@alshehab211
Copy link
Author

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

@LinusDietz LinusDietz self-assigned this Mar 30, 2017
@LinusDietz
Copy link
Member

LinusDietz commented Mar 30, 2017

So short poll which solution from #2687 (comment) 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.

@alshehab211
Copy link
Author

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

@LinusDietz
Copy link
Member

@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.

@alshehab211
Copy link
Author

@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?!

@LinusDietz
Copy link
Member

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

@alshehab211
Copy link
Author

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

@tobiasdiez
Copy link
Member

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.

@koppor koppor removed the beginner label Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs keygenerator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants