diff --git a/src/main/java/org/jabref/gui/entryeditor/DeprecatedFieldsTab.java b/src/main/java/org/jabref/gui/entryeditor/DeprecatedFieldsTab.java index d7bf6afab51..2beabdf1699 100644 --- a/src/main/java/org/jabref/gui/entryeditor/DeprecatedFieldsTab.java +++ b/src/main/java/org/jabref/gui/entryeditor/DeprecatedFieldsTab.java @@ -1,6 +1,7 @@ package org.jabref.gui.entryeditor; import java.util.Collections; +import java.util.HashSet; import java.util.Optional; import java.util.Set; @@ -53,7 +54,14 @@ public DeprecatedFieldsTab(BibDatabaseContext databaseContext, protected Set determineFieldsToShow(BibEntry entry) { Optional entryType = entryTypesManager.enrich(entry.getType(), databaseContext.getMode()); if (entryType.isPresent()) { - return entryType.get().getDeprecatedFields(); + Set validDeprecatedFields = new HashSet<>(); + for (Field field : entryType.get().getDeprecatedFields()) { + Optional fieldValue = entry.getField(field); + if (fieldValue.isPresent()) { + validDeprecatedFields.add(field); + } + } + return validDeprecatedFields; } else { // Entry type unknown -> treat all fields as required return Collections.emptySet();