Skip to content

The "Remove subgroups" command leaves entries with non-existing groups #7556

@sauliusg

Description

@sauliusg

JabRef version master commit d31ef4d on Linuxmint-20.1

JabRef 100.0.0
Linux 5.8.0-45-generic amd64
Java 14.0.2
JavaFX 16+8

Steps to reproduce the behavior:

  1. Load library 'groups.bib' from the attached 'groups.zip' file;
    groups.zip

  2. Open the groups interface; Left click on "Programming" group to seelct it; right-click on the "Programming" group;

  3. Pick "Remove subgroups", confirm the action;

  4. Hit "Ctrl-S" to save the file.

The the saved file, the "Techniques" group is gone, but the entry that belonged to it still mentions the (now non-existent) group "Techniques":

saulius@starta group-deletion-not-saved/ $ git diff
diff --git a/bugs/group-deletion-not-saved/groups.bib b/bugs/group-deletion-not-saved/groups.bib
index f10fa9002..2a4fd124e 100644
--- a/bugs/group-deletion-not-saved/groups.bib
+++ b/bugs/group-deletion-not-saved/groups.bib
@@ -18,7 +18,6 @@
 0 AllEntriesGroup:;
 1 StaticGroup:Computer science\;2\;1\;0x8a8a8aff\;\;\;;
 2 StaticGroup:Programming\;2\;1\;0x8a8a8aff\;\;\;;
-3 StaticGroup:Techniques\;2\;1\;0x8a8a8aff\;\;\;;
 1 StaticGroup:Chemistry\;2\;1\;0x8a8a8aff\;\;\;;
 2 StaticGroup:Chemiinformatics\;2\;1\;0x8a8a8aff\;\;\;;
 }
saulius@starta group-deletion-not-saved/ $ grep -P 'groups\s*=' groups.bib
  groups    = {Techniques},

In contrast, if I select the "Techniques" group itself and click "Remove group and subgroups", the "Techniques" label is removed from the entries "groups = {...}" field (as expected).

Log File
Paste an excerpt of your log file here

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions