Skip to content

Unexpected interaction of keyword and static groups #5331

Closed
@sauliusg

Description

JabRef version 5.0-dev (commit db96f88 master) on Ubuntu-16.04 x86_64

  • [x ] I have tested the latest development version from * master db96f88 Fix problem with search and switching between libraries (#5326) from https://github.com/JabRef/jabref.git and the problem persists

The GUI allows to add a static group (or another manually created group) to an automatically create(d) keyword group. However, when such new group is created as a subgroup of the root keyword group ("kwds" in my example), it is not displayed in the GUI, although it is registered in the program (the second group with the same name can not be created), and is written into the bibliography file. The only way to access or get rid of such group seems to be manual editing of the bibtex file.

If, on the other hand, the new group is manually created as a subgroup of a sub-keyword, it is displayed in the GUI, but is not saved into the output file.

Steps to reproduce the behavior:

  1. Copy the example bibtex database to a new file (both files are in test-keyword-groups.zip):
    cp test-keyword-groups-saved.bib test-keyword-groups.bib
  2. Run JabRef on the copy of the file:
    build/image/bin/JabRefMain test-keyword-groups.bib &
  3. Create an "Automatically create groups" subgroup on all entries, call it "kwds":
    Screenshot from 2019-09-19 16-47-39
  4. Try to add a "sub-kwds" group by right clicking on the "kwds" group and then immediately "OK". The group is created but not shown on the GUI:
    Screenshot from 2019-09-19 16-52-00
  5. Now try to create a group with the same name, "sub-kwds", as as subgroup of "All entries" (right click on "All entries", select "Add subgroup", enter "sub-kwds" as "Name", click "OK"). An error message "There exists already a group with the same name" appears. The "sub-kwds" group, however, is not shown, even after collapsing and expanding the "kwds" groups:
    Screenshot from 2019-09-19 16-54-01
  6. Add a sub-group of some keyword: right-click on "languages", select "Add subgroup", name it "sub-languages", click "OK". A new sub-group appears on the list:
    Screenshot from 2019-09-19 16-56-38
  7. Click the "Save library" icon to save the bibtex file; exit the JabRef.

The resulting "test-keyword-groups.bib" file has the following groups:

@Comment{jabref-meta: grouping:
0 AllEntriesGroup:;
1 AutomaticKeywordGroup:kwds\;0\;keywords\;,\;>\;1\;0xffffffff\;\;\;;
2 StaticGroup:sub-kwds\;0\;1\;0xffffffff\;\;\;;
}

Loading this file again into JabRef obviously will miss the "sub-languages" group (which was shown on the GUI!), but will retain the hidden "sub-kwds" group; this group is not shown on the GUI but one can not create such group once more (thus it is registered in the group list). A workaround to "unhide" this group is to edit the "test-keyword-groups.bib" with a text editor and change 2 StaticGroup:sub-kwds to 1 StaticGroup:sub-kwds, for example.

Both BibTeX files are attached in a ZIP archive.
test-keyword-groups.zip

Metadata

Assignees

No one assigned

    Labels

    [outdated] type: bugConfirmed bugs or reports that are very likely to be bugscomponent: groupsstatus: staleIssues marked by a bot as "stale". All issues need to be investigated manually.

    Type

    No type

    Projects

    • Status

      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions