Saving custom entry type with same name overwrites existing entry type
JabRef version
6.0-alpha.4
Operating system
Windows
Details on version and operating system
No response
Checked with the latest development build (copy version output from About dialog)
- [x] I made a backup of my libraries before testing the latest development version.
- [x] I have tested the latest development version and the problem persists
Steps to reproduce the behaviour
Follow https://docs.jabref.org/setup/customentrytypes
How to reproduce
- Type "Book" and press the + button
- Notice there are now two entrytypes with the name of "Book".
- Press "save"
Result:
The custom entry type "Book" overwrites the standardtype "Book", hence instead of two books, there will only be one book and all fields will be gone.
Solution
At the very least, if users type in the field for custom entry types, they should not be able to press the + button, if this entrytype already exists. There are should be a tiny tooltip that tells the user duplicate entry types are not supported. Something along the lines of "It is not possible to have two entry types with the same name".
I am not quite sure yet, what implications this has for migrating from old versions of JabRef to new Versions of JabRef with updated entrytypes or even what happens, if users with custom entry types open a library with unique entry types.
Appendix
...
Log File
Paste an excerpt of your log file here
Thanks for outlining the proposed solution.
I agree that disabling the ā+ā button and showing a clear tooltip would improve the user experience. At the same time, it seems important to also guard against overwriting at the core level (where custom entry types are stored), so duplicates are prevented even outside the UI (e.g., imports or migrations).
Iām thinking of:
- Ensuring uniqueness checks when saving custom entry types (case-insensitive / normalized comparison)
- Adding UI feedback (disabled button + message) when a conflict is detected
Does this align with the expected behavior, or would you prefer a UI-only solution for now?
The custom entry type "Book" overwrites the standardtype "Book", hence instead of two books, t
Works as discussed several times before you joined.
Please search issues for "customized entry types", "standard types".
There are many discussions.
We need to write that down at docs/requirements to make the knowledge more accessible.
One reason is that ppl want to customize the entry type to fields required by a certain BST file.
@koppor You can modify an existing entry type and delete/remove fields. That works. But we cannot have two entry types with the same name, nor fields
+1 for
they should not be able to press the + button, if this entrytype already exists.
Ensuring uniqueness checks when saving custom entry types
Not required as addition is not possible
This probably refs https://github.com/JabRef/jabref/pull/11230
Actually, the most elegant (UI) solution I can think of would be:
- [x] implement a "search while you type" and show the existing entrytypes (e.g. "Book") in a dropdown during the search. If a duplicate entrytype (= same name as an existing entry type) is entered and the user presses enter or the + button it will automatically select and switch the table on the right (where users can edit the fields) to the already existing entrytype.
Good enough solution (for now):
- [ ] they should not be able to press the + button, if this entrytype already exists.
/assign-me
š Hey @pluto-han, thank you for your interest in this issue! š
We're excited to have you on board. Start by exploring our Contributing guidelines, and set up your local development workspace by following the steps in our workspace setup guidelines to get started smoothly.
For questions on JabRef functionality, you can consult the JabRef Guru. For questions related to the codebase, please start using DeepWiki.
In case you encounter failing tests during development, please check our developer FAQs!
Still facing issues or having more questions? Feel free to ask here on GitHub or on JabRef's Gitter chat. Please don't hesitate to open a (draft) pull request early on to show the direction you are heading towards if unsure.
Happy coding! š
- mplement a "search while you type" and show the existing entrytypes (e.g. "Book") in a dropdown during the search
Does the user really expect existing types when asked for a new type?
I would propose:
- Label of button "+" is "Add" if the entry type is not in the list
- Label of button "+" is "Modify" if entry type is in the list
"Modify" just selects the existing type, "Add" creates a new one.
Hi! I am working on this in PR #15116. I've hit a small bot error (422 validation) during the PR check regarding assignees, but the code is ready for a look!
hi @janhlavati , i was assigned to this issue first and have already submitted a pr. Thx for the work tho^^
It seems that @janhlavati AI cannot fuliy understand "good open source behavior". š„
We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.
For any feedback, add a comment to the pull request at https://github.com/JabRef/jabref/pull/15107.