Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic keyword groups do not update in group list when keywords change #7129

Open
1 task done
igelstorm opened this issue Nov 27, 2020 · 7 comments
Open
1 task done
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups

Comments

@igelstorm
Copy link

igelstorm commented Nov 27, 2020

JabRef version 5.1--2020-08-30--e023aa0 on Windows 10.

  • Mandatory: I have tested the latest development version from https://builds.jabref.org/master/ and the problem persists. The problem persists in 5.2--2020-11-26--f1a2fa7.

Summary

It is possible to create dynamic, auto-generated groups based on the contents of a field, e.g. keywords. (In the Groups interface, Add subgroup, and choose Collect by > Specified keywords). However, these dynamically generated groups don't update when new keywords appear in the file. In other words, if you edit an item in such a way that a new keyword appears, it does not appear in the dynamic list of groups, unless you close and re-open the file.

As a user, I would expect the list of groups to update dynamically when I make changes. At a minimum, I would expect there to be an obvious way to refresh the group list without having the close and re-open the file.

Steps to reproduce the behavior

  1. Open the attached example bibliography (see below, or download the following file and rename to .bib: reprex.txt).
  2. Open the Groups interface, and observe that there is a group called example, containing 1 item - this is automatically generated from the keyword field of the example item.
  3. Edit the example article, and change the "keyword" field to a different string (e.g. new keyword).
  4. Observe that in the Groups interface, the example group is still present, now with 0 items, and no new keyword group has appeared. We would expect example to disappear from the list, and new keyword to appear.
  5. Close the file and repeat steps 1 and 2; observe that example has disappeared, and new keyword appears, i.e. the list of groups has updated to match what's in the file. There should be a way to force this to update, without having to close and re-open the file.
Example bibliography
% Encoding: UTF-8

@Article{example,
  author   = {Example},
  journal  = {Example},
  title    = {Example},
  year     = {2020},
  keywords = {example},
}

@Comment{jabref-meta: databaseType:bibtex;}

@Comment{jabref-meta: grouping:
0 AllEntriesGroup:;
1 AutomaticKeywordGroup:Keyword\;0\;keywords\;,\;>\;1\;0x8a8a8aff\;\;\;;
}

Screenshots

Initial state (steps 1-2):
image

The keywords have been changed, but the list of groups has not been updated (step 4):
image

@Siedlerchr Siedlerchr added groups bug Confirmed bugs or reports that are very likely to be bugs labels Nov 27, 2020
@HoussemNasri
Copy link
Member

There should be a way to force this to update, without having to close and re-open the file.

GroupSidePane updates also when you navigate from and back to the tab

@AtrusRiven
Copy link
Contributor

AtrusRiven commented Dec 2, 2020

At the moment, when you edit the group and then press Ok the whole automatically collected entries are being actualized. That's a workaround that avoids closing and opening the window again. But that should be fixed if possible.

Another thing caught my attention (5.2--2020-11-21--b0af521, Windows 10 10.0 amd64, Java 14.0.2): When you edit a group that collects entries based on a specific keyword the circle box Generate groups from keywords in the following field is unchecked although when creating this group is has been checked and although the original keyword is still visible in the text field (greyed out). If you just want to change the name of such a group but forget to check that box again the group is changed into a regular group (without any automatically collected entries).

Is this a separate bug?

@Gan-Cheng
Copy link
Contributor

I have reproduced this issue in the new version. Could I try to fix it?

@Css22
Copy link
Contributor

Css22 commented Apr 22, 2022

Hello, I wanna have a try to solve this problem. Can I give it a shot?
Based on #7153 (comment) I would like to speed up or refactor his method to face large-scale data.

@ThiloteE
Copy link
Member

@Css22 hey, yes feel free to! :-)

As a general advise and if you are new to open source and JabRef: check out https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md for a start. Also, https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace is a good start. Feel free to ask if you have any questions here on GitHub or also at JabRef's Gitter chat.

Try to open a (draft) pull request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback.

@Css22
Copy link
Contributor

Css22 commented Apr 25, 2022

Thank you for your reply. I will do it as soon as possible.

@ilippert
Copy link
Contributor

check #4681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups
Projects
Status: Normal priority
8 participants