-
-
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
Entry is missing after sublibrary is generated from aux file #6405
Comments
The zip file is upload a test repo for the security purpose. You can find all the files at https://github.com/xx256xx/test. Run test.bat to quickly reproduce the issue. |
Okay, this seems to be a bit weird. I debugged a bit further and found out that the problem lies in the following lines when saving: jabref/src/main/java/org/jabref/logic/bibtex/BibEntryWriter.java Lines 58 to 62 in 7cc5747
The second entry, the one with "lichman" has the flag changed = false and the getParsedSerialization() returns an empty string. |
The code at hand ensures that entries are only written in JabRefs cool new "layout" if there is a change. This was a year-long discussion before you joined JabRef. - The idea is that JabRef stores the characters as they are read when reading the file. It writes out the characters as is when writing - except the user has changed something. - This is what the if condition states. Now to the issue: I think, the code creating entries from the aux file just does not set the |
Set changed flag on clone also for Misc entry type, because otherwise it equals the default entry type and no change is triggered which results in the entry not beeing written to the database on save Fixes #6405 Simplify gui code
@koppor Thanks for the explanation. That was indeed very helpful and let me to the root issue, that the clone method does not set the changed flag when the entry type is Misc and therefore equals the default entry type. |
* Fix entry gets deleted after aux import Set changed flag on clone also for Misc entry type, because otherwise it equals the default entry type and no change is triggered which results in the entry not beeing written to the database on save Fixes #6405 Simplify gui code * add changelog * fix checkstyle shit * copy serialization on clone * Update CHANGELOG.md Co-authored-by: Tobias Diez <tobiasdiez@gmx.de> * Cosmetic change * Fix clone * Mark each entry changed to trigger a "proper" write by JabRef Co-authored-by: Tobias Diez <tobiasdiez@gmx.de> Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
@xx256xx This issue is now fixed in the latest master We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you. Please remember to make a backup of your library before trying-out this version. |
JabRef version 5.0 on Windows 10
Steps to reproduce the behavior:
No log available.
Log File
The text was updated successfully, but these errors were encountered: