Polygerrit project filter not filtering the exact project

225 views
Skip to first unread message

Ansar

unread,
Jul 21, 2020, 8:38:12 AM7/21/20
to Repo and Gerrit Discussion
Hi All,

In Gerrit v2.16.21 the polygerrit GUI is not filtering exact project name instead it prints all related project name. Seems its filtering the project contains all the words. 

in 2.15 its prints perfectly. PFB 


But in 2.16, it prints another project too 

Matthias Sohn

unread,
Jul 21, 2020, 9:36:23 AM7/21/20
to Ansar, Repo and Gerrit Discussion
I think that's not a bug but a feature, this way you can also find your project by typing "template"
which I find very useful since I keep forgetting the prefix of long hierarchical names.

-Matthias 

Ansar

unread,
Jul 21, 2020, 10:10:54 AM7/21/20
to Repo and Gerrit Discussion
But it also printing another project name which is not acceptable. 

Ansar

unread,
Jul 22, 2020, 9:39:11 AM7/22/20
to Repo and Gerrit Discussion
is there any way to bring this feature back?? 

nunoco...@gmail.com

unread,
Jul 23, 2020, 6:14:11 AM7/23/20
to Repo and Gerrit Discussion
This bug report[1] is in some way related with the behavior presented here.

It would be great to have a full path pattern or some kind of regex.

Full path filtering works on 2.16.21 old UI.

vvavr...@gmail.com

unread,
Jul 23, 2020, 7:08:00 AM7/23/20
to Repo and Gerrit Discussion
maybe add checkbox: "exact match".

Raj Ravi

unread,
Jul 23, 2020, 7:15:04 AM7/23/20
to Repo and Gerrit Discussion
Hi Vvavr,

Can you please let me know where we have to use the checkbox :"exact match".

Regards,
Raj Ravi

vvavr...@gmail.com

unread,
Jul 23, 2020, 7:16:56 AM7/23/20
to Repo and Gerrit Discussion
I mean, it would be great if Gerrit implement such checkbox.

pdz

unread,
Jul 30, 2020, 7:49:23 AM7/30/20
to Repo and Gerrit Discussion
The trouble with how this project filtering works now in Polygerrit is that it treats '/' '_' and ' ' (slash, underscore, space) in the filter box the same way: as word separators.
Unlike in the old UI in 2.16 or in both UIs in 2.15, where '/' is used literally as part of a string to search for.

Now coming from 2.15, where we created quite elaborate hierarchies of projects using '/', the current filtering in Polygerrit breaks the whole concept of hierarchies.
E.g. we have many project like that:
A/B/C/x
A/B/C/foo
A/B/C/bar
D/E/x
F/G/H/I/x

Putting 'A x' or 'A/x' or 'A_x' or 'x/a' or 'x a' in the filter box will always return the same result
(What's interesting, searching for 'x' will look for 'x' even in the project description! (but 'x A' will stop searching through the description and will look into project name only :) ))
It's really hard to understand the logic.

But most importantly, with the current logic I'm not able to show only part of the hierarchy, e.g. all projects that start with 'A/B'

The fix would be to start treating '/' and '_' literally as part of project names.
Would be great because I could search for A/B/*/x  putting 'A/B x' or 'x A/B' in the filter box.

PS.
Filtering box for groups works as it used to work in 2.15 :)

David Ostrovsky

unread,
Jul 30, 2020, 9:54:11 AM7/30/20
to Repo and Gerrit Discussion

Am Donnerstag, 30. Juli 2020 13:49:23 UTC+2 schrieb pdz:
The trouble with how this project filtering works now in Polygerrit is that it treats '/' '_' and ' ' (slash, underscore, space) in the filter box the same way: as word separators.

Seems that this was changed in: [1].

The commit message also stating:

  Do the same for other split characters as defined in SchemaUtil#getNameParts.

where the SchemaUtil#getNameParts also splitting for problematic char: '/':

public static Set<String> getNameParts(String name, Iterable<String> emails) {
    Splitter at = Splitter.on('@');
    Splitter s = Splitter.on(CharMatcher.anyOf("@.- /_")).omitEmptyStrings();


Message has been deleted

pdz

unread,
Jul 31, 2020, 4:44:05 AM7/31/20
to Repo and Gerrit Discussion
Thanks David.
To be honest I have trouble understanding what the change was trying to fix...
"-/_" are legal characters that can, and often are, used in project names. 
I can use them when searching for projects with REST API or ssh ls-projects but not in the search box in Polygerrit :/

Reply all
Reply to author
Forward
0 new messages