I am using the latest JabRef 5 master build:
JabRef-5.0-portable_linux.tar.gz
JabRef 5.0-beta.360--2020-01-21--7ddfd9f
Linux 4.4.0-171-generic amd64
Java 13.0.2
on Ubuntu 16.04
I have enabled the _biblatex mode_ for the current library as well as in the JabRef settings in general ("Default bibliography mode"). When I select an entry of e.g. type "Misc" in the list of references and I open the entry editor, then I cannot find the input field "Editor" in any of the listed tabs. This is independent of whether e.g. editor={Abc, Def} is actually defined in the this reference or not.
This is totally odd. Could you please try resetting your preferences?
I have now resetted the preferences and restarted JabRef afterwards. Then I created a new biblatex library with a new "misc" entry type. The "editor" field still does not show up.
I have then closed JabRef once again and removed the whole settings directory located in ~/.java/.userPrefs/org/jabref and subsequently started JabRef. I created a new biblatex library with a new "misc" entry type. No "editor" field appeared.
For both aforementioned cases, JabRef shows the following:



Then I created a new bibtex library with a new "book" entry type. No "editor" field could be found either (assuming there should be one, as stated in the bibtex documentation, attached below).
JabRef shows the following:


bibtex (http://mirror.kumi.systems/ctan/biblio/bibtex/base/btxdoc.pdf) states for entry type "book:
"book":
Now I can reproduce it as well. Strange. @koppor @tobiasdiez Did we change that somehow or is this just some display issue?
When I look in RequiredFieldsTab.java and set a breakpoint at return fields; in the method SortedSet<Field> determineFieldsToShow(BibEntry entry), then I see that fields has the value ["AUTHOR", "KEY_FIELD", "DATE", "TITLE"] for the entry type "Misc" (so Editor is missing) for the reference
@Misc{ABC01,
author = {Coetzee, Derrick and Fox, Armando and Hearst, Marti},
title = {Author},
timestamp = {2020-01-30},
year = {2005},
}
and also for the reference
@Misc{ABC02,
editor = {Coetzee, Derrick and Fox, Armando and Hearst, Marti},
title = {Editor},
timestamp = {2020-01-30},
year = {2005},
}
as well as for the reference
@Misc{ABC03,
editor = {Coetzee, Derrick and Fox, Armando and Hearst, Marti},
author = {Coetzee, Derrick and Fox, Armando and Hearst, Marti},
title = {Editor and Author},
timestamp = {2020-01-30},
year = {2005},
}
But Optional<BibEntryType> entryType in the same method SortedSet<Field> determineFieldsToShow(BibEntry entry) has the value Optional[BibEntryType{type=Misc, requiredFields=[[AUTHOR, EDITOR], [DATE], [TITLE]], type=...}].
So it doesn't seem to be a visual bug.
Well, the real field defintions are here in the BiblatexEntryTypeDefintions
RequiredFields etc is based on the current bib entry.
.withRequiredFields(new OrFields(StandardField.AUTHOR, StandardField.EDITOR), StandardField.TITLE, StandardField.DATE)
Yes, I have seen that, but finally ["AUTHOR", "KEY_FIELD", "DATE", "TITLE"] will be returned for rendering the tab "Required fields". (But for some reason I have some difficulties in debugging in there.)
I guess the problem is that Author/Editor is an or field (i.e. only one of them is required). Maybe do it like in the book definition and define Editor not as required but as an important field?
https://github.com/JabRef/jabref/blob/f53568b0f370ffbe338b9fc9948892300e411c30/src/main/java/org/jabref/model/entry/types/BiblatexEntryTypeDefinitions.java#L38-L43
Remark: I guess, this problem will affect various entry types, so that some fields might not be shown at all (meaning: specific fields like Editor are sometimes shown nowhere, so neither in the tab "Required Fields" nor in the tab "Optional Fields", etc.). I would prefer, that all required "OrFields" show up in the tab "Required Fields". (Maybe it could be indicated somehow, that either the one or the other is finally required.)
I have noticed, that -- even if I changed something in BiblatexEntryTypeDefinitions.java, like converting new OrFields(StandardField.AUTHOR, StandardField.EDITOR) to StandardField.AUTHOR, StandardField.EDITOR for testing purposes -- the GUI did not reflect these changes, due to the fact, that in JabRefMain.java some custom or modified types get loaded:
Globals.entryTypesManager.addCustomOrModifiedTypes(preferences.loadBibEntryTypes(BibDatabaseMode.BIBTEX),
preferences.loadBibEntryTypes(BibDatabaseMode.BIBLATEX));
I found out, that these files are stored in:
~/.java/.userPrefs/org/jabref/customizedBiblatexTypes/prefs.xml
and
~/.java/.userPrefs/org/jabref/customizedBibtexTypes/prefs.xml
My questions:
I would recommend for now that in RequiredFieldsTab.java the method determineFieldsToShow(BibEntry entry) resolves e.g. OrFields(StandardField.AUTHOR, StandardField.EDITOR) to StandardField.AUTHOR, StandardField.EDITOR by updating fields.addAll(entryType.get().getRequiredFields().stream().map(OrFields::getPrimary).collect(Collectors.toSet())); correspondingly.
How can this be achieved?
The custom and builtin entry types can be modified using the dialog manage custom entry types. See my other PR, where I reimplemented that dialog
Oh, I see, in the master branch, this entry in the options is currently hidden.
@Siedlerchr Do you know how my suggestion (see above) could be implemented?
Not completely sure, but the following might work: 虁fields.addAll(entryType.get().getRequiredFields()). The problem is the getPrimary call, which only gets the first of the OrField.