Skip to content

Commit 0ae7269

Browse files
Siedlerchrstefan-kolb
authored andcommitted
Fix convert to bibtex moves contents of the file field (#4123)
* Fix convert to bibtex moves contents of the file field Fixes #4210 * fix twisted numbers of issue
1 parent db9e4e5 commit 0ae7269

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
4343
- We reworked the "Edit file" dialog to make it resizeable and improved the workflow for adding and editing files https://github.com/JabRef/jabref/issues/2970
4444
- We fixed an issue where the month was not shown in the preview https://github.com/JabRef/jabref/issues/3239.
4545
- Rewritten logic to detect a second jabref instance. [#4023](https://github.com/JabRef/jabref/issues/4023)
46+
- We fixed an issue where the "Convert to BibTeX-Cleanup" moved the content of the `file` field to the `pdf` field [#4120](https://github.com/JabRef/jabref/issues/4120)
4647
- We fixed an issue where the preview pane in entry preview in preferences wasn't showing the citation style selected [#3849](https://github.com/JabRef/jabref/issues/3849)
4748

4849
### Removed

Diff for: src/main/java/org/jabref/model/entry/EntryConverter.java

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public class EntryConverter {
2525
EntryConverter.FIELD_ALIASES_TEX_TO_LTX.put("archiveprefix", FieldName.EPRINTTYPE);
2626
EntryConverter.FIELD_ALIASES_TEX_TO_LTX.put(FieldName.JOURNAL, FieldName.JOURNALTITLE);
2727
EntryConverter.FIELD_ALIASES_TEX_TO_LTX.put(FieldName.KEY, "sortkey");
28-
EntryConverter.FIELD_ALIASES_TEX_TO_LTX.put(FieldName.PDF, FieldName.FILE);
2928
EntryConverter.FIELD_ALIASES_TEX_TO_LTX.put("primaryclass", FieldName.EPRINTCLASS);
3029
EntryConverter.FIELD_ALIASES_TEX_TO_LTX.put(FieldName.SCHOOL, FieldName.INSTITUTION);
3130

Diff for: src/test/java/org/jabref/logic/cleanup/ConvertToBibtexCleanupTest.java

+10
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,14 @@ public void cleanupMovesJournaltitleToJournal() {
5151
assertEquals(Optional.empty(), entry.getField(FieldName.JOURNALTITLE));
5252
assertEquals(Optional.of("Best of JabRef"), entry.getField(FieldName.JOURNAL));
5353
}
54+
55+
@Test
56+
public void cleanUpDoesntMoveFileField() {
57+
String fileField = ":Ambriola2006 - On the Systematic Analysis of Natural Language Requirements with CIRCE.pdf:PDF";
58+
BibEntry entry = new BibEntry().withField(FieldName.FILE, fileField);
59+
60+
worker.cleanup(entry);
61+
62+
assertEquals(Optional.of(fileField), entry.getField(FieldName.FILE));
63+
}
5464
}

0 commit comments

Comments
 (0)