-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conversation
There was a problem hiding this 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)))){ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks! |
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.