Automatic Grouping By Entry Type#15081
Conversation
|
Hey @alxafan! 👋 Thank you for contributing to JabRef! We have automated checks in place, based on which you will soon get feedback if any of them are failing. We also use Qodo for review assistance. It will update your pull request description with a review help and offer suggestions to improve the pull request. After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs. You can read about the whole pull request process in our contribution guide. Please ensure that your pull request is in line with our AI Usage Policy and make necessary disclosures. |
Review Summary by QodoAdd entry type grouping feature for automatic group creation WalkthroughsDescription• Added ability to group entries by entry type automatically • Implemented new AutomaticEntryTypeGroup and EntryTypeGroup classes • Added UI radio button option in GroupDialog for entry type grouping • Updated group management logic to handle entry type groups Diagramflowchart LR
A["User selects Entry Type<br/>in GroupDialog"] --> B["GroupDialogViewModel<br/>creates AutomaticEntryTypeGroup"]
B --> C["AutomaticEntryTypeGroup<br/>creates subgroups by type"]
C --> D["EntryTypeGroup instances<br/>filter entries by type"]
D --> E["Entries organized<br/>by entry type"]
File Changes1. jabgui/src/main/java/org/jabref/gui/groups/GroupDialogView.java
|
Code Review by Qodo
1. EntryType group not persisted
|
| } else if (Boolean.TRUE.equals((typeEntryTypeProperty.getValue()))) { | ||
| resultingGroup = new AutomaticEntryTypeGroup(groupName, groupHierarchySelectedProperty.getValue()); |
There was a problem hiding this comment.
1. Entrytype group not persisted 🐞 Bug ⛯ Reliability
AutomaticEntryTypeGroup can be created via the UI, but the metadata group serializer/parser do not recognize it. This will either crash on save (unsupported serialization) or fail to reload the group tree (unknown group type), risking loss of group configuration.
Agent Prompt
### Issue description
`AutomaticEntryTypeGroup` is creatable in the GUI, but it is not supported by the groups metadata persistence layer. This will break saving/loading group trees.
### Issue Context
JabRef persists groups via `MetaDataSerializer.serializeGroups(...)` which calls `GroupSerializer.serializeTree(...)`. Loading uses `GroupsParser.fromString(...)` keyed by `MetadataSerializationConfiguration` IDs.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/util/MetadataSerializationConfiguration.java[14-40]
- jablib/src/main/java/org/jabref/logic/exporter/GroupSerializer.java[113-195]
- jablib/src/main/java/org/jabref/logic/importer/util/GroupsParser.java[102-210]
- jablib/src/test/java/org/jabref/logic/exporter/GroupSerializerTest.java[113-156]
- jablib/src/test/java/org/jabref/logic/importer/util/GroupsParserTest.java[116-178]
### Notes on expected implementation
- Introduce something like `AUTOMATIC_ENTRY_TYPE_GROUP_ID = "AutomaticEntryTypeGroup:"`.
- Serialization format can mirror other `Automatic*Group` formats: `id + name + context + groupDetails` (expanded/color/icon/description).
- Parser should tokenize `name` and `context`, instantiate `new AutomaticEntryTypeGroup(name, context)`, then apply `addGroupDetails(...)`.
- Add unit tests for serialize + parse roundtrip for the new type.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
✅ All tests passed ✅🏷️ Commit: 5702f2e Learn more about TestLens at testlens.app. |
|
Thanks for your contribution! Looking forward to seeing more from you :) |
* upstream/main: Refine Automatic Field Editor filtering logic (fixes JabRef#15066) (JabRef#15094) Output URL to workflow Fix token Refine stats message Quick fix to reduce load on runners "Debug" output for assign-issue-action Streamline pr-comment.yml (and remove status: stale label) Feature provide insights citation fetcher (JabRef#15093) Automatic Grouping By Entry Type (JabRef#15081) Minor test fixes for arXiv (JabRef#15100) New Crowdin updates (JabRef#15101) recomment linked files handler (JabRef#15105) Chore(deps): Bump jablib/src/main/resources/csl-styles (JabRef#15087) Streamline binaries (JabRef#15085)
Closes #15040
Added the option to group entries by entry type
Modified the group dialog window to accommodate for the new option and implemented the necessary logic
Steps to test
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)