JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.62k stars 2.57k forks source link

Automatic groups does not include items matched by subgroups #3667

Closed PierreMarchand20 closed 5 years ago

PierreMarchand20 commented 6 years ago

I use "All entries" to automatically generate groups using hierarchical keywords. It works great but when I click on "All entries", some are still in gray. I do not see any pattern to explain why these entries are in gray (they are not in the same group for example, and other entries from their group are not in gray).

capture d ecran 2018-01-26 a 11 00 49
koppor commented 6 years ago

Please provide a complete screenshot. I think, you have activated a search and have the floating mode on. By search, I mean the following:

grafik

Oh, wow, it does not have floating active when having "All entries" selected and a search is active.

It does if I use a sub-group:

grafik

PierreMarchand20 commented 6 years ago

I did not really understand what you mean, but here's a complete screenshot:

capture d ecran 2018-01-29 a 09 28 37
PierreMarchand20 commented 6 years ago

Notice that there are 260 entries in "All entries" according to the group interface, while I have more than 260 entries.

tobiasdiez commented 6 years ago

I use "All entries" to automatically generate groups using hierarchical keywords.

Can you please explain how you did this. Did you changed the all entries group?

PierreMarchand20 commented 6 years ago

Well I tried to do what you explained in #1495, si I edited the "All entries" group as follows:

capture d ecran 2018-01-29 a 11 37 06

I worked great so far.

tobiasdiez commented 6 years ago

ok, this is kind of expected. When you convert the "All entries" group to an automatic group it forgets about its original functionality and only shows entries that belong to one of the generated subgroups. So I suspect that these additional entries that you see don't belong to any group (i.e. have an empty groups field).

@JabRef/developers Should we make the "AllEntriesGroup" readonly? Editing this group may have unexpected side-effects as shown by this question but on the other hand this would prevent such creative solutions as the one from @PierreMarchand20, which automatically generates the whole groups tree.

PierreMarchand20 commented 6 years ago

Well no, they all belong to a group (see below for example), that is why I was even more suprised. capture d ecran 2018-01-29 a 12 10 09 Having a way to automatically generate the whole groups tree is also a good idea !

stefan-kolb commented 6 years ago

Make All entries read-only and always show all entries of the DB!

PierreMarchand20 commented 6 years ago

At the end, I will have to do one subgroup database that contains all my entries and make it create automatically the group tree, so why not be able to do that directly in the All entry group ? It seemed logical to me, that is why I did it

tobiasdiez commented 6 years ago

Ok, this is strange. Is this particular entry correctly matched by the Analysis subgroup? If you don't mind, could you please append your bib file here or send it to developers@jabref.org so that we can have a closer look and debug the problem. Thanks.

PierreMarchand20 commented 6 years ago

Yes, it appears when I click on the group Analysis (see below), I will send my bib to developers@jabref.org . capture d ecran 2018-01-29 a 12 54 57

tobiasdiez commented 6 years ago

@PierreMarchand20 Thanks for the file. I now had time to look into this problem and could figure-out the root cause. The problem is that automatic groups right now never include entries that are matched by subgroups. Steps to reproduce (or just look at the automatic group in complex.bib):

  1. Create some automatic group in such a way that subgroups are created. Set its mode to Including.
  2. The automatic group contains no entries although its subgroups match some entries.

So in your case the All Entries group should actually be empty. But you have a few manually specified groups in your bib file that are ignored in the display (since there the tree is created automatically) but are used to match entries. So if you change the groups tree at the end of the file to

@Comment{jabref-meta: grouping:
0 AutomaticKeywordGroup:All entries\;2\;groups\;,\;>\;1\;\;DATABASE\;\;;
1 AllEntriesGroup:;
}

then everything should work as desired. However, this is a very ugly hack!

PierreMarchand20 commented 6 years ago

Thank you for your answer ! I am not married to the idea of using All Entries :-) but what is the right to do so then ? That is to say, how can I manage automatically all the groups using a field groups ?

I must say it took me a while to be able to use automatically created groups. In the documentation (http://help.jabref.org/en/Groups#automatically-creating-dynamic-groups), it is said that there is a button to do it (and I think there was one may be at some point in the Group menu ), but since I could not find it, I ask the following question #3265 , where I understood it needed to be a done in a group. That is why I arrived to the point where I modified All Entries. But, if there is a "prettier" way to do so, I would gladly use it !

fspreng commented 5 years ago

My colleagues and I would much appreciate if this problem was resolved - at least for other groups containing automatically generated subgroups than the "All Entries" group. Many thanks in advance!

tobiasdiez commented 5 years ago

I had a look at this issue and sadly don't see a way to fix this issue without major changes to the complete group infrastructure. The problem is that the subgroups created by the automatic group only exist virtually (i.e they are not written to the file).

Thus, I sadly have to set this issue on freeze for the moment. Sorry!