From 98f6c6564a4ba76938e7537eba14945e432fd6f7 Mon Sep 17 00:00:00 2001 From: LIM0000 Date: Wed, 18 May 2022 13:39:58 +0930 Subject: [PATCH 1/2] Fix #8012 by adding validation before setting value to field that object does not have --- src/main/java/org/jabref/gui/entryeditor/SourceTab.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/entryeditor/SourceTab.java b/src/main/java/org/jabref/gui/entryeditor/SourceTab.java index d1773f9563f..b9b534d30eb 100644 --- a/src/main/java/org/jabref/gui/entryeditor/SourceTab.java +++ b/src/main/java/org/jabref/gui/entryeditor/SourceTab.java @@ -306,7 +306,9 @@ private void storeSource(BibEntry outOfFocusEntry, String text) { new FieldWriter(fieldWriterPreferences).write(fieldName, newValue); compound.addEdit(new UndoableFieldChange(outOfFocusEntry, fieldName, oldValue, newValue)); - outOfFocusEntry.setField(fieldName, newValue); + if (outOfFocusEntry.getField(fieldName).isPresent()) { + outOfFocusEntry.setField(fieldName, newValue); + } } } From c328bb3dc079427ac78a11a868a53a0b120be958 Mon Sep 17 00:00:00 2001 From: LIM0000 Date: Sun, 22 May 2022 23:22:58 +0930 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8af025df4c1..30ec18094d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue where deprecated fields tab is shown when the fields don't contain any values. [#8396](https://github.com/JabRef/jabref/issues/8396) - We fixed an issue which allow us to select and open identifiers from a popup list in the maintable [#8758](https://github.com/JabRef/jabref/issues/8758), [8802](https://github.com/JabRef/jabref/issues/8802) - We fixed an issue where the escape button had no functionality within the "Filter groups" textfield. [koppor#562](https://github.com/koppor/jabref/issues/562) +- We fixed an issue where right clicking a group and choose "remove selected entries from this group" leads to error when Bibtex source tab is selected. [#8012](https://github.com/JabRef/jabref/issues/8012) ### Removed