jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Entry types preferences: Unable to remove multiline property from field

Open Siedlerchr opened this issue 1 year ago β€’ 8 comments

JabRef version

Latest development branch build (please note build date below)

Operating system

Other (please describe below)

Details on version and operating system

OS independent

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

Custom entry types I changed the "Author" field to multiline for the "Article" entry type in preferences.

Image

After restarting JabRef, the "Author" field became multiline for all entry types, even though it should only apply to "Article".

Now, when I try to change the "Author" field back to a single line by unchecking the option and restarting, nothing happens. To remove the multiline setting, I have to update it for all entry types.

Does Reset to default work?

No, it doesn’t. It only resets the selected entry type, the "Article", but the "Author" field is still marked as multiline in other entry types. So, when saving, it remains multiline because of those other types.

Appendix

...

Log File
Paste an excerpt of your log file here

Siedlerchr avatar Oct 07 '24 18:10 Siedlerchr

Hey @Siedlerchr, I am able to recreate this issue on the latest development branch build and I would be interested in picking this issue up as my first contribution if the issue does not have anyone assigned/planned to be assigned on it. Thanks.

PressJump avatar Oct 08 '24 03:10 PressJump

Welcome to the vibrant world of open-source development with JabRef!

Newcomers, we're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! πŸš€

github-actions[bot] avatar Oct 08 '24 04:10 github-actions[bot]

As a general hint, fields are global and shared among the entry types. That explains part of the issue and is by design. However, at least the reset should work and the toggle between multiline and single line

Siedlerchr avatar Oct 08 '24 04:10 Siedlerchr

As a general hint, fields are global and shared among the entry types. That explains part of the issue and is by design. However, at least the reset should work and the toggle between multiline and single line

Thanks for this, it makes sense that the entry types are global among entry types but I do see that it does not reset/toggle between multi-line and single line.

PressJump avatar Oct 10 '24 10:10 PressJump

After looking into the issue, I see that the current implementation for multiline fields are saved and used globally shared among entry types like the implementation of required fields causing the original bug where one of the entry types having a field checked will toggle all other multiline options of its field in other entry types. This will require the modification of NonWrappableFields implementation in FieldPreferences with accommodation for per entry type field options making it possible to apply the multiline option per entry type rather than globally as per the issue description. This modification will require changes across multiple files as the NonWrappableFields getter is used 30 times in the codebase.

I will further look into this tomorrow and put together a draft pull request for testing.

PressJump avatar Oct 12 '24 11:10 PressJump

Refs https://github.com/JabRef/jabref/issues/11951

HoussemNasri avatar Oct 13 '24 23:10 HoussemNasri

As a general hint, fields are global and shared among the entry types. That explains part of the issue and is by design. However, at least the reset should work and the toggle between multiline and single line

Hey @Siedlerchr, it seems like I was quite confused on the issue as I was working on a solution reflected by my comment https://github.com/JabRef/jabref/issues/11897#issuecomment-2408524905 which was proposing a major change that would modify FieldPreferences but I believe I am on the right track now.

I believe the pull request https://github.com/JabRef/jabref/pull/12040 is a potential solution to the original issue with a non invasive fix to the problem. I would appreciate your feedback to confirm that I am on the right path to move forward on fixing the reset to default functionality.

I've marked the pull request as a draft for now because it doesn't yet address the issue around the reset button. I’m a rather a bit confused on the expected behavior for the reset button and what was originally wrong with it could you clarify this part for me?

PressJump avatar Oct 20 '24 07:10 PressJump

Related issue: https://github.com/JabRef/jabref/issues/9840

koppor avatar Oct 20 '24 08:10 koppor

JabRef 6.0-alpha.15--2025-01-06--5f3fbbc Linux 6.8.0-51-generic amd64 Java 23.0.1 JavaFX 23.0.1+4

Can I ask about the status of this issue?

wujastyk avatar Jan 08 '25 00:01 wujastyk

/assign-me

sryjksu avatar Nov 10 '25 02:11 sryjksu

πŸ‘‹ Hey @sryjksu, 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! πŸš€

github-actions[bot] avatar Nov 10 '25 02:11 github-actions[bot]

⏰ Assignment Reminder

Hi @sryjksu, this is a friendly reminder about your assignment to this issue.

[!WARNING] This issue will be automatically unassigned in 11 days if there's no activity.

Remember that you can ask the JabRef Guru or DeepWiki about anything regarding JabRef. Additionally, our contributing guide has hints on creating a pull request and a link to our Gitter chat.

How to keep your assignment


If you are working on it, you can prevent automatic unassignment by:

  • Submitting a draft pull request with your progress within 11 days
  • Asking for the πŸ“Œ Pinned label if you need more time

We appreciate your contribution and are here to help if needed!

github-actions[bot] avatar Nov 19 '25 12:11 github-actions[bot]