-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Duplicate fields assigned to entry types #8194
Comments
Footnote: this is probably a Biblatex issue not a Jabref one, but I would often like to be able to add multiple URLs or eprint fields. For example, when recording a multi-volume book where the vols are at different URLs at archive.org. Happens quite frequently |
Hello! I would like to take a look at this. From what I understand, we want a warning popup to be shown to the user when he tries to add an existing field. Is that correct? Thank you. |
I think a warning is a good idea. |
@wujastyk It's not possible to have the same field twice in bibtex/biblatex with the same name. The spec does not allow this. Think of it like a Dictionary with key-value mapping. More details here http://tug.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf Show a warning with "Warning: You added field X twice. Only one will be kept." Codwise the dialog is located here https://github.com/JabRef/jabref/tree/main/src/main/java/org/jabref/gui/customentrytypes |
Thanks for the guidance! I will try this out. |
@Siedlerchr yes, no, quite. I understand the limitations and features of BibTeX and BibLaTeX. My thought was that maybe JabRef could repackage multiple-field data into a single output BibTeX field. ISBN is probably insoluble, unless the info was concatenated into a note field. With multiple urls, which I have a lot, perhaps multiple urls could be wrapped in \url{xxx} and concatenated into a note or some other field. But the more I think about this, the more I think it's probably too fiddly and not very good. |
Changed the method addNewField of class CustomEntryTypeDialogViewModel in order to check if the field already exists. Added DialogService field to class CustomEntryTypeDialogViewModel in order to show warning notification to the user. fixes JabRef#8194
@dimitrisdimos00 You do not reed to run gradlew check locally, when you create a PR the Github Actions CI is executed with the unit tests. If that is green, then it's fine. If you modify a class that has existing tests, it's of course useful to execute them in your IDE locally. Also, useful is usually the LocalizationConsistencyTest e.g. if you changed/added the L10n. Otherwise, proceed with your PR so we can review it. |
… CustomizeEntryTypeDialogView classes fixes JabRef#8194
…vice warning inside if-else condition. fixes JabRef#8194
JabRef version
Latest development branch build (please note build date below)
Operating system
Windows
Details on version and operating system
JabRef 100.0.0 Windows 10 10.0 amd64 Java 16 JavaFX 17.0.0.1+1
Checked with the latest development build
Steps to reproduce the behaviour
Options > Customize entry types
Expected: We should ignore the user request or display a warning to tell him that he is trying to add a duplicate field
CustomizeEntryTypeView
the duplicate will be goneAppendix
No response
The text was updated successfully, but these errors were encountered: