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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#

### Fixed
- Repairs the handling of apostrophes in the LaTeX to unicode conversion. [#2500](https://github.com/JabRef/jabref/issues/2500)
- Fix import of journal title in ris format. [#2506](https://github.com/JabRef/jabref/issues/2506)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)))) {
//if there is no journal title, then put second title as journal title
fields.put(FieldName.JOURNAL, value);
} else if ("JO".equals(tag)) {
//if this field appears then this should be the journal title
fields.put(FieldName.JOURNAL, value);
} else if ("T3".equals(tag)) {
fields.put(FieldName.SERIES, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void setUp() throws URISyntaxException {
public static Collection<String> fileNames() {
return Arrays.asList("RisImporterTest1", "RisImporterTest3", "RisImporterTest4a", "RisImporterTest4b",
"RisImporterTest4c", "RisImporterTest5a", "RisImporterTest5b", "RisImporterTest6",
"RisImporterTestDoiAndJournalTitle", "RisImporterTestScopus");
"RisImporterTestDoiAndJournalTitle", "RisImporterTestScopus", "RisImporterTestScience");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@Article{,
author = {Ghosh, Chanchal and Basu, Joysurya and Ramachandran, Divakar and Mohandas, E.},
title = {Phase separation and ω transformation in binary V-Ti and ternary V-Ti-Cr alloys},
journal = {Acta Materialia},
year = {2016},
volume = {121},
pages = {310--324},
month = dec,
issn = {1359-6454},
abstract = {Abstract},
keywords = {V-Ti-Cr alloys, Spinodal decomposition, ω phase transformation, High-resolution electron microscopy, Energy-filtered transmission microscopy},
url = {//www.sciencedirect.com/science/article/pii/S1359645416307273},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
TY - JOUR
T1 - Phase separation and ω transformation in binary V-Ti and ternary V-Ti-Cr alloys
JO - Acta Materialia
VL - 121
IS -
SP - 310
EP - 324
PY - 2016/12//
T2 -
AU - Ghosh, Chanchal
AU - Basu, Joysurya
AU - Ramachandran, Divakar
AU - Mohandas, E.
SN - 1359-6454
DO - http://dx.doi.org/10.1016/j.actamat.2016.09.028
UR - //www.sciencedirect.com/science/article/pii/S1359645416307273
KW - V-Ti-Cr alloys
KW - Spinodal decomposition
KW - ω phase transformation
KW - High-resolution electron microscopy
KW - Energy-filtered transmission microscopy
AB - Abstract
ER -