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

Fix journal title in ris importer #2510

Merged
merged 2 commits into from
Feb 2, 2017

Conversation

tschechlovdev
Copy link
Contributor

Fix for #2506.
The problem was that the T2 field was used for the journal title, if it comes first. Now T2 is only used for the journal title, if the field JO does not appear. I've also added the file from science direct as test case.

@tschechlovdev tschechlovdev changed the title [WIP] Fix journal title in ris importer Fix journal title in ris importer Feb 2, 2017
@tschechlovdev tschechlovdev added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 2, 2017
Copy link
Member

@lenhard lenhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks very much for addressing this! I have only a minor formatting comment.

Moreover, could you add a changelog entry that refers to the #2506?

@@ -129,7 +129,11 @@ public ParserResult importDatabase(BufferedReader reader) throws IOException {
fields.put(FieldName.TITLE, fields.get(FieldName.TITLE).replaceAll("\\s+", " ")); // Normalize whitespaces
} else if ("BT".equals(tag)) {
fields.put(FieldName.BOOKTITLE, value);
} else if ("T2".equals(tag) || "JO".equals(tag)) {
} else if ("T2".equals(tag)&&(fields.get(FieldName.JOURNAL) == null || "".equals(fields.get(FieldName.JOURNAL)))){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix the formatting in the condition here? I am referring to whitespaces between operators && and the operands.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Also added a changelog entry.

@tobiasdiez tobiasdiez removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 2, 2017
@tobiasdiez tobiasdiez merged commit 99223c4 into JabRef:master Feb 2, 2017
@tobiasdiez
Copy link
Member

Thanks!

Siedlerchr added a commit that referenced this pull request Feb 2, 2017
* upstream/master:
  Fix journal title in ris importer (#2510)
  French localization: Main file: translations of strings (#2512)

# Conflicts:
#	CHANGELOG.md
@tschechlovdev tschechlovdev deleted the ris-fix-journaltitle branch February 3, 2017 14:22
Siedlerchr added a commit that referenced this pull request Feb 3, 2017
* upstream/master:
  Fix export of number + pubstate in OFFice XML (#2514)
  Groups button and context menu for adding groups (#2508)
  Fix journal title in ris importer (#2510)
  French localization: Main file: translations of strings (#2512)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants