Skip to content

[Port to black-forest] Fix subgroups disappearing when added from the All entries context menu - #28

Open
jabref-machine wants to merge 1 commit into
black-forestfrom
port-17803-to-black-forest
Open

jabref-machine wants to merge 1 commit into
black-forestfrom
port-17803-to-black-forest

Conversation

@jabref-machine

Copy link
Copy Markdown
Collaborator

Port of JabRef#17803 to black-forest, see Branching strategy.

If this PR is a draft, the cherry-pick conflicted: the conflicting files are committed with Git's conflict markers left in. Resolve the markers locally, push, and mark the PR ready.

…nu (JabRef#17803)

### Summary

In a new library, right-clicking **All entries** and choosing **Add
subgroup** could show a success message even though the subgroup was
missing from the tree and the saved library. The action now adds the
subgroup to the current **All entries** node after the dialog closes.

### Steps to test

1. Create a new library, add the example entry, and select it.
2. Right-click **All entries** and choose **Add subgroup**. Enter `a`
and leave **Include selected entries in created group** checked.

![Add subgroup dialog with the name a and the selected entry
included](https://raw.githubusercontent.com/doraem-on/jabref/e43d5ce813cef42128243b5294040c24735e1447/01-add-subgroup.png)

3. Click **OK**. The subgroup should appear under **All entries** with
one entry.

![The subgroup a appears with one
entry](https://raw.githubusercontent.com/doraem-on/jabref/e43d5ce813cef42128243b5294040c24735e1447/02-subgroup-created.png)

4. Save the library, close the tab, and reopen the file. The subgroup
should still contain one entry.

![The reopened library shows the subgroup a with one
entry](https://raw.githubusercontent.com/doraem-on/jabref/e43d5ce813cef42128243b5294040c24735e1447/03-library-reopened.png)

Verified on macOS. The group tree regression test and GUI Checkstyle
checks passed. The test passes the old root to the action after
rebuilding the tree and checks the children of the current root.

### Related issues and pull requests

Closes JabRef#17764.

### AI usage

OpenAI GPT-6 assisted with the implementation, regression test under my
direction. I ran local verification. I manually reviewed and verified
the code

### Checklist

- [x] I own the copyright of the code submitted and I license it under
the [MIT license](https://github.com/JabRef/jabref/blob/main/LICENSE)
- [x] If AI tools were used, I disclosed them in the "AI usage" section
and reviewed, understood, and take full ownership of all AI-generated
code
- [x] I manually tested my changes in running JabRef (always required)
- [x] I added JUnit tests for changes (if applicable)
- [x] I added screenshots in the PR description (if change is visible to
the user)
- [x] I added **one sentence (max 20 words)** to `CHANGELOG.md`
describing the change from the user's point of view (if the change is
visible to the user)
- [x] I checked the [user documentation](https://docs.jabref.org/) for
up to dateness and submitted a pull request to our [user documentation
repository](https://github.com/JabRef/user-documentation/tree/main/en)

(cherry picked from commit 9d5bd28)
@jabref-machine jabref-machine added the automerge PR is tagged with that label will be merged if workflows are green label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge PR is tagged with that label will be merged if workflows are green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants