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

DOI not imported from RIS file #6530

Closed
1 task done
crystalfp opened this issue May 27, 2020 · 6 comments · Fixed by #6590
Closed
1 task done

DOI not imported from RIS file #6530

crystalfp opened this issue May 27, 2020 · 6 comments · Fixed by #6590
Labels
bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty. import

Comments

@crystalfp
Copy link

JabRef 5.1--2020-05-23--03e3663
Windows 10 10.0 amd64
Java 14.0.1

Importing in a biblatex library the attached RIS file does not load the DOI field.

PMC4756000.txt

Steps to reproduce the behavior:

  1. Change the attached file extension back to RIS
  2. Import it in a biblatex library
  3. Notice the DOI field is empty, but the file contains a DO field.
@Siedlerchr Siedlerchr added import bug Confirmed bugs or reports that are very likely to be bugs labels May 27, 2020
@Siedlerchr Siedlerchr added the good first issue An issue intended for project-newcomers. Varies in difficulty. label May 27, 2020
@Siedlerchr
Copy link
Member

Thanks for your report.
A quick look in the code revealed that the DOI only gets imported if it starts with doi;

private void addDoi(Map<Field, String> hm, String val) {
String doi = val.toLowerCase(Locale.ENGLISH);
if (doi.startsWith("doi:")) {
doi = doi.replaceAll("(?i)doi:", "").trim();
hm.put(StandardField.DOI, doi);

Seems like it's missing an else case. Ideally it would also be better to use our DOI class for "parsing" the DOI.

PS: Did you know that JabRef has the ability to import entries directly by PMID?
Just New Entry -> Pubmed/Medline -> enter the id

@libkoi libkoi mentioned this issue May 30, 2020
5 tasks
@braincident
Copy link
Contributor

For me it seems not necessary to check if the DOI field exactly starts with "doi:", if it is listed in the RIS file, it should be already verified. So importing and loading will just be fine.
Even if the DOI is listed and imported in wrong format, users can still check and correct it in the APP.

Siedlerchr added a commit that referenced this issue Jun 6, 2020
Use DOI parse and only add valid DOIs


Follow up from #6557

Fixes #6530
@Siedlerchr Siedlerchr mentioned this issue Jun 6, 2020
5 tasks
@Siedlerchr
Copy link
Member

This should be now fixed in the latest master (currently building, ready in roughly half an hour)
We know use our internal DOI parser to check for anything that looks like a valid doi (with or without prefix/url) and add the parsed DOI.

We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you. Please remember to make a backup of your library before trying-out this version.

@crystalfp
Copy link
Author

On the build/master page there is still the JabRef 5.1--2020-06-04--7cc5747 that has not solved the problem. I'll wait for a new one. Thanks!

@Siedlerchr
Copy link
Member

Thanks for the hint, the build got canceled by GitHub. I re triggered a new one just now.
https://github.com/JabRef/jabref/runs/745120654

@crystalfp
Copy link
Author

OK! Version JabRef 5.1--2020-06-06--5676d65 solved the problem. Thanks!

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 good first issue An issue intended for project-newcomers. Varies in difficulty. import
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants