Skip to content
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

manually defined multiline fields in entry editor do not work #4373

Closed
ilippert opened this issue Oct 15, 2018 · 8 comments · Fixed by #6315
Closed

manually defined multiline fields in entry editor do not work #4373

ilippert opened this issue Oct 15, 2018 · 8 comments · Fixed by #6315
Labels
bug Confirmed bugs or reports that are very likely to be bugs entry-editor good first issue An issue intended for project-newcomers. Varies in difficulty.

Comments

@ilippert
Copy link

This is
JabRef 5.0-dev--snapshot--2018-10-14--master--73ec32189
Linux 4.18.12-200.fc28.x86_64 amd64
Java 1.8.0_172

In this and prior dev versions, I seem not be able (anymore) to define multiline fields in the entry editor. I used to have defined an own general field with multiline content; but now this is not shown as such any more. Only, I guess pre-defined, fields like "Abstract" are shown as multiline fields.

@tobiasdiez tobiasdiez added this to Needs triage in Bugs via automation Oct 15, 2018
@tobiasdiez tobiasdiez added this to ToDo in JavaFX UI Rework via automation Oct 15, 2018
@ilippert
Copy link
Author

just for reference - I am referring to those fields I defined in
JabRef 4.3
Linux 4.18.12-200.fc28.x86_64 amd64
Java 1.8.0_172

at JabRef preferences | File "Do not wrap the following fields when saving"

@tobiasdiez tobiasdiez moved this from Needs triage to Low priority in Bugs Nov 13, 2018
@Bastian-B
Copy link

Bastian-B commented Mar 8, 2020

Hi everyone! Has this been resolved for the now released version 5.0? I just installed it and all the manual linebreaks are gone despite the respective list. What seems odd: They are only missing in the "annote"-field, while everything is fine in "abstract" or "comment". Does anyone have an idea? Thank you!

@ilippert
Copy link
Author

ilippert commented Mar 9, 2020

I confirm:
JabRef 5.0--2020-03-08--93de138
Linux 5.5.7-200.fc31.x86_64 amd64
Java 13.0.2
the issue is not solved.

@koppor koppor added the bug Confirmed bugs or reports that are very likely to be bugs label Mar 9, 2020
@Siedlerchr
Copy link
Member

I looked into the code and it's hardcoded for abstract and comment:

// TODO: Move somewhere more appropriate and make user-configurable
public static boolean isSingleLineField(final Field field) {
if (field.equals(StandardField.ABSTRACT) || field.equals(StandardField.COMMENT)) {
return false;
}
// Treat unknown fields as multi-line fields
return !(field instanceof UnknownField);

As the "Do not wrap fields" aka multine are already stored in the preferences as part of the FieldContentFormatterPreferences it can be used.

  1. Pass the preferences down to the above method and check the list
  2. If it's in the list => multiline
  3. Otherwise single line

@Siedlerchr Siedlerchr added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Mar 9, 2020
@Siedlerchr Siedlerchr added this to the v5.1 milestone Mar 9, 2020
@tobiasdiez tobiasdiez removed this from the v5.1 milestone Apr 12, 2020
@ilippert
Copy link
Author

ilippert commented Apr 15, 2020

I am terribly sorry, but I would love to insist that this is an issue that is really preventing me from using jabref well. This bug prevents me from using all my manually defined multiline fields. Please, please add it to the agenda for v5.1 again ;) - and lots of health and good spirit in the hard covid19 times!

@Bastian-B
Copy link

May I asked why this has been removed from the agenda? For myself, JabRef is unusable at the moment since all my annotations are shredded upon saving a file in 5.0, so I had to move to manually editing bibtex files …

Siedlerchr added a commit that referenced this issue Apr 19, 2020
Siedlerchr added a commit that referenced this issue Apr 19, 2020
Bugs automation moved this from Normal priority to Closed May 8, 2020
Siedlerchr added a commit that referenced this issue May 8, 2020
* Make wrap fields also visible in entry editor

Fixes #4373

* change comment

* add changelog
@Siedlerchr
Copy link
Member

We created a simple temporary solution for this issue: In the Preferences add the fields to the list of "do not wap".
Should be available in latest master in half an our so.
I created a follow up issue to create a better solution #6448

@ilippert
Copy link
Author

ilippert commented May 9, 2020

Thank you so much, this temp fix boosts productivity enormously!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs entry-editor good first issue An issue intended for project-newcomers. Varies in difficulty.
Projects
Archived in project
Bugs
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants