Created attachment 132021 [details] Filter By Group Hi Robby, Since version 3.1 (?) the function "Filter by Group" is carried out with Regex in the group view: (^ |; \ s) Test supplier ($ |;). (In version 3.0 still the simple "contains"). My problem: if I want to filter via a table with 3 columns ("Test supplier :: 21.09.2017 :: 29.09.2020"), there are no entries for the value "Test supplier". During the previous filtering via "contains 'Test supplier'") he found all entries. Since I am not an expert on Regex, I cannot say what the expression "(^ |; \ s) test supplier ($ |;)" should then be. Do you have a solution? And could you include this in the next version? Or could I do this by myself in a config file? I would be grateful for a solution. I can determine all entries using the standard filter, but the group filter would be nice. greetings Udo SUMMARY STEPS TO REPRODUCE 1. 2. 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: OpenSuse 15.2 (available in About System) KDE Plasma Version: 5.18.5 KDE Frameworks Version: 5.71.0 Qt Version: 5.12.7 ADDITIONAL INFORMATION
Git commit 29a8e530d06238413dc7b25c92486941d2a0a6bd by Robby Stephenson. Committed on 11/10/2020 at 19:51. Pushed by rstephenson into branch 'master'. Account for table rows in the "Filter by Group" regexp pattern Move the creation of the regular expression pattern to a static method so the unit test can ensure it matches the group view. Call the FieldFormat methods for choosing the delimiter values. Add multiple additional unit tests to verify. FIXED-IN: 3.4 M +4 -0 ChangeLog M +19 -0 src/fieldformat.cpp M +1 -0 src/fieldformat.h M +3 -7 src/groupview.cpp M +25 -1 src/tests/filtertest.cpp https://invent.kde.org/office/tellico/commit/29a8e530d06238413dc7b25c92486941d2a0a6bd
(In reply to Fabiano Caruana from comment #0) > Since I am not an expert on Regex, I cannot say what the expression "(^ |; \ > s) test supplier ($ |;)" should then be. > Do you have a solution? Try "(^|;\s)test supplier($|[;:])"
(In reply to Robby Stephenson from comment #2) > (In reply to Fabiano Caruana from comment #0) > > Since I am not an expert on Regex, I cannot say what the expression "(^ |; \ > > s) test supplier ($ |;)" should then be. > > Do you have a solution? > > Try "(^|;\s)test supplier($|[;:])" Hi Robby, Thanks for your suggestion (I only read it today ... sorry). The proposed function will only find the supplier if he is the first in the table. Supplier Amazon is found: Amazon 06/28/2016 08/28/2020 Wasgau 07/10/2019 10/14/2020 Lidl 04/28/2020 04/28/2020 Supplier Amazon is not found: Wasgau 07/10/2019 10/14/2020 Lidl 04/28/2020 04/28/2020 Amazon 06/28/2020 08/28/2020 But would the question still be where I can edit and save a definition for the group filter, or is it hard-coded? OK, then I'll wait until version 3.4. greetings Udo