Enhance customization of entry types#15290
Conversation
Review Summary by QodoAdd field property selection for custom entry types with v2 format support
WalkthroughsDescription• Add field property selection UI for custom entry types • Implement new jabref-entrytype-v2 format with field properties • Support parsing and serializing field properties using | separator • Maintain backward compatibility with v1 format in preferences Diagramflowchart LR
UI["UI: CheckComboBox<br/>Field Properties"]
FieldVM["FieldViewModel<br/>Store Properties"]
Serializer["MetaDataSerializer<br/>v2 Format"]
Parser["MetaDataParser<br/>Parse v2"]
Storage["Preferences<br/>v1 + v2"]
UI -->|"Selected Properties"| FieldVM
FieldVM -->|"Serialize"| Serializer
Serializer -->|"Write to .bib"| Storage
Storage -->|"Read from .bib"| Parser
Parser -->|"Restore Properties"| FieldVM
File Changes1. jabgui/src/main/java/org/jabref/gui/preferences/customentrytypes/CustomEntryTypesTab.java
|
Code Review by Qodo
1.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Can you take a look at the failing Windows test? And also take a look at the QODO point regarding the parsing order? |
* upstream/main: (21 commits) chore(deps): update dependency com.konghq:unirest-modules-gson to v4.10.0 (JabRef#15715) Add manual tests (JabRef#15351) Refactored the comments for UnlinkedFilesCrawler (JabRef#15709) Replace inline styles with CSS classes (JabRef#15694) add test case for multiple authors in csl citaiton (JabRef#15707) fix invalid desktop file for linux (JabRef#15702) Change FileKeystore and Folder fields to disable/enable (JabRef#15685) Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom from 3.30.0 to 3.30.1 (JabRef#15696) New Crowdin updates (JabRef#15693) Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (JabRef#15698) Chore(deps): Bump org.apache.logging.log4j:log4j-to-slf4j in /versions (JabRef#15700) chore(deps): update dependency org.apache.logging.log4j:log4j-to-slf4j to v2.26.0 (JabRef#15699) Chore(deps): Bump org.openrewrite.rewrite from 7.32.1 to 7.32.2 (JabRef#15697) Chore(deps): Bump jablib/src/main/resources/csl-locales (JabRef#15689) Fix month checker regex (JabRef#15678) Chore(deps): Bump com.dlsc.gemsfx:gemsfx in /versions (JabRef#15692) Chore(deps): Bump org.hisp.dhis:json-tree in /versions (JabRef#15691) Chore(deps): Bump jablib/src/main/resources/csl-styles (JabRef#15690) New Crowdin updates (JabRef#15687) Chore(deps): Bump com.konghq:unirest-java-core in /versions (JabRef#15683) ...
I'm sorry for the late response, just saw this comment. GitHub did not notify me:( Edit: The Windows test fails again, I'll work on it. |
|
My bet is something with the OS.newline stuff somehwere in writing or you have a harcoded \n somewhere |
|
|
||
| databaseWriter.writeDatabase(bibtexContext); | ||
|
|
||
| assertEquals(""" |
There was a problem hiding this comment.
I think textblocks use internally \n that could explain the windows failure
There was a problem hiding this comment.
Yes the internally \n is the culprit


Related issues and pull requests
Closes #9840
PR Description
In this pr, I added a new data format
jabref-entrytype-v2, which use|to separate field names with field properties.In preference -> entry types, I added property selection checkbox for custom fields in custom entry types, and persisted them using the
jabref-entrytype-v2while keepingjabref-entrytypefor compatibility.Steps to test
Open preference -> entry types
Select
Authorfield,PERSON_NAMESproperty shows up in field property selection checkbox, but cannot be modified.Author1234field, property can be modified as it is now a custom field. CheckBOOK_NAMEproperty and press "add" and save.Add a new entry type
Mytype. Add required fieldtestwith propertyBOOK_NAME, optional field "person' with propertyPERSON_NAMESand optional fieldtitle. Save bib file and restart jabref.bib file should contain:
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)Required verification screenshot