Skip to content

Commit e1a9b5e

Browse files
committed
Fix date parsing for Doab fetcher
Fixes #9571 Fixes JabRef/jabref-issue-melting-pot#75
1 parent 7db5e2d commit e1a9b5e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
2626
### Fixed
2727

2828

29+
- We fixed an issue where searching for a specific term with the DOAB fetcher lead to an exception [#9571](https://github.com/JabRef/jabref/issues/9571)
2930

3031

3132

src/main/java/org/jabref/logic/importer/fetcher/DOABFetcher.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ private BibEntry jsonToBibEntry(JSONArray metadataArray, JSONArray bitstreamArra
117117
}
118118
}
119119
case "dc.type" -> entry.setType(StandardEntryType.Book);
120-
case "dc.date.issued" -> entry.setField(StandardField.YEAR, String.valueOf(
121-
dataObject.getInt("value")));
120+
case "dc.date.issued" -> entry.setField(StandardField.DATE, String.valueOf(
121+
dataObject.getString("value")));
122122
case "oapen.identifier.doi" -> entry.setField(StandardField.DOI,
123123
dataObject.getString("value"));
124124
case "dc.title" -> entry.setField(StandardField.TITLE,

0 commit comments

Comments
 (0)