Preserve casing of field names for customize entry types#9993
Conversation
|
BibtexDatabaseWriterTest > writeCustomizedTypesInAlphabeticalOrder() FAILED |
| ", requiredFields=" + requiredFields + | ||
| ", fields=" + fields + | ||
| '}'; | ||
| return "type = " + type + "," + OS.NEWLINE + |
There was a problem hiding this comment.
I guess this will break many tests! Rather add a new method
| bibtexContext.setMode(BibDatabaseMode.BIBTEX); | ||
|
|
||
| databaseWriter.savePartOfDatabase(bibtexContext, Arrays.asList(entry, otherEntry)); | ||
| databaseWriter.savePartOfDatabase(bibtexContext, List.of(entry, otherEntry)); |
There was a problem hiding this comment.
I think there was a reason to pass a modifiable list
There was a problem hiding this comment.
I double checked the code - no modification of the list inside. I added a JavaDoc comment.
|
The problem you know have is that the tests don't distinguish between custom field names and normal field names if they have the same name. This is hella complex now... |
Please unzip. 😅 MetaDataParsing: Yesterday, we opted to use |
|
Please take a look at the failng tests :-P |
|
Only problem I now see is migration of existing custom entry types/fields. |
Why? When parsing the bib file, the casing is stored in JabRef. That casing is written out again. Thus, the bib file are kept.as is..IMHO also covered by tests. What does break is the UI: The first letter will be lower case. |
|
Yeah, seems fine but after we resave it in the UI the casing is changed? |
The UI displays the casing found in the bib file.. User modifies casing: bib modified User does not modify casing: bib not modified IMHO as exected. |
|
no risk no fun! |

Follow-up to #9977, refs #9840.
This PR especially (tries) to adhere that
Fieldis constant and that the ViewModel is the thing collecting data and at the end converts it to a "real" data object.Result of a coding session started with @calixtus and @Siedlerchr.
@Comment{jabref-entrytype: person: req[GoogleScholar;ORCID;name] opt[]}Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)