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

Display deprecated fields in misc entry also in optional fields tab #4389

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public OptionalFields2Tab(BibDatabaseContext databaseContext, SuggestionProvider

@Override
protected Collection<String> determineFieldsToShow(BibEntry entry, EntryType entryType) {
return entryType.getSecondaryOptionalNotDeprecatedFields();
return entryType.getSecondaryOptionalFields();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this now also shows the deprecated fields in the second optional pane?

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public Set<String> getPrimaryOptionalFields() {
FieldName.orFields(FieldName.YEAR, FieldName.DATE));
addAllOptional(FieldName.SUBTITLE, FieldName.TITLEADDON, FieldName.LANGUAGE, FieldName.HOWPUBLISHED,
FieldName.TYPE, FieldName.VERSION, FieldName.NOTE, FieldName.ORGANIZATION, FieldName.LOCATION,
FieldName.MONTH, FieldName.ADDENDUM, FieldName.PUBSTATE, FieldName.DOI, FieldName.EPRINT,
FieldName.DATE, FieldName.MONTH, FieldName.YEAR, FieldName.ADDENDUM, FieldName.PUBSTATE, FieldName.DOI, FieldName.EPRINT,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you add Date and Year here? They fields are already in the required tab?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See biblatex manual, 2.1.1 misc entry type.
It's listed both in required and optional fields. Either it's an error in the spec or there is some reason why this is double?

Required felds: author/editor, title, year/date
Optional felds: subtitle, titleaddon, language, howpublished,
type, version, note, organization, location, date, month, year,
addendum, pubstate, doi, eprint, eprintclass, eprinttype, url,
urldate

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that looks to me like an error in manual.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was confirmed as an error, created an issue at biblatex repo.

FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE);
}

Expand Down
6 changes: 0 additions & 6 deletions src/main/java/org/jabref/model/entry/EntryType.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ default Set<String> getDeprecatedFields() {
return deprecatedFields;
}

default Set<String> getSecondaryOptionalNotDeprecatedFields() {
Set<String> optionalFieldsNotPrimaryOrDeprecated = new LinkedHashSet<>(getSecondaryOptionalFields());
optionalFieldsNotPrimaryOrDeprecated.removeAll(getDeprecatedFields());
return optionalFieldsNotPrimaryOrDeprecated;
}

/**
* Get list of all optional fields of this entry and their aliases.
*/
Expand Down