jabref
jabref copied to clipboard
[WIP] Fix Issue Unable to remove multiline property from field
This pull request aims to fix the issue where the user is unable to remove a multi-line property from fields. This is done through the addition of a checkbox listener that also checks the multiline boxes in other entry types as they are by design global Ref: https://github.com/JabRef/jabref/issues/11897#issuecomment-2398827353. This not only gives visual feedback of the change to the user but also fixes the issue without refactoring CustomEntryTypesTabViewModel logic as the original issue stemmed from the for-loop inside storeSettings overriding boolean changes which was also originally mentioned in the issue.
To remove the multiline setting, I have to update it for all entry types.
https://github.com/JabRef/jabref/issues/11897#issuecomment-2398827353
Setting the value of the field in all entry types utilizes this to fix the issue.
Closes https://github.com/JabRef/jabref/issues/11897
Mandatory checks
- [x] I own the copyright of the code submitted and I licence it under the MIT license
- [ ] Change in
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable) - [ ] Tests created for changes (if applicable)
- [x] Manually tested changed features in running JabRef (always required)
- [ ] Screenshots added in PR description (for UI changes)
- [ ] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
- [ ] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.
Thanks for the fix! See the comment from @koppor and add a changelog entry
Hey @koppor, thank you for your review and I am sorry that this issue has dragged out this long. I would like to make sure I am on the same page before I update this pull request. My original thought while working on this issue was that multi-line fields were global between entry types per comment https://github.com/JabRef/jabref/issues/11897#issuecomment-2398827353 saying
As a general hint, fields are global and shared among the entry types.
If I understand correctly from your comment and provided images, the expected behavior is for multiline fields to act like required fields and be entry type independent than global? So any change made in "In Proceedings" would not affect "Book". Which makes sense why my work on this pull request needs change.
I actually thought this was the case originally per my comment https://github.com/JabRef/jabref/issues/11897#issuecomment-2408524905 detailing the changes that would be required. This is also why I backtracked on comment https://github.com/JabRef/jabref/issues/11897#issuecomment-2424713765 as the concern I had is that FieldPreferences and CLIPreferences would require significant modification on how Fields are Stored as they are currently stored as a string list but would need to be saved as a key-value pair as "FieldName", "Value".
Thank you for your helpful review and support.
Closing this issue due to inactivity :zzz: