Bug 17170 - Add the ability to create 'saved searches' for use as filters when searching the catalog
Summary: Add the ability to create 'saved searches' for use as filters when searching ...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature (vote)
Assignee: Nick Clemens (kidclamp)
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 22605
Blocks: 33680 33734 34761 33011
  Show dependency treegraph
 
Reported: 2016-08-23 15:32 UTC by Nick Clemens (kidclamp)
Modified: 2023-09-13 00:35 UTC (History)
11 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Medium patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/667
Text to go in the release notes:
This patchset adds a new feature, the ability to save searches on the staff client and display them in the results page alongside facets (staff client and/or OPAC) as a search filter that can be applied to search result set. The feature is enabled/disabled by new system preference: SavedSearchFilters New filters can be added from the results page after a search, and there is an admin page for updating deleting and renaming filters. There is a new permission, manage_search_filters, to control management of these filters. New filters can be added that are not displayed along with facets, this allows for building custom links using these filters to keep URLs shorter
Version(s) released in:
22.11.00


Attachments
Bug 17170: DB Updates (11.61 KB, patch)
2022-04-13 15:07 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DO NOT PUSH - Schema Updates (2.30 KB, patch)
2022-04-13 15:07 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (995 bytes, patch)
2022-04-13 15:07 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.51 KB, patch)
2022-04-13 15:07 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.83 KB, patch)
2022-04-13 15:07 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.70 KB, patch)
2022-04-13 15:07 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (26.98 KB, patch)
2022-04-13 15:07 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.09 KB, patch)
2022-04-13 15:07 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when apprropriate (2.91 KB, patch)
2022-04-15 16:39 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Correct handling of limits in ES (12.13 KB, patch)
2022-04-18 14:57 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.61 KB, patch)
2022-07-01 16:30 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DO NOT PUSH - Schema Updates (2.30 KB, patch)
2022-07-01 16:30 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (995 bytes, patch)
2022-07-01 16:30 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.44 KB, patch)
2022-07-01 16:30 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.83 KB, patch)
2022-07-01 16:30 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.15 KB, patch)
2022-07-01 16:30 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (34.29 KB, patch)
2022-07-01 16:31 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.09 KB, patch)
2022-07-01 16:31 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when apprropriate (2.91 KB, patch)
2022-07-01 16:31 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Correct handling of limits in ES (12.13 KB, patch)
2022-07-01 16:31 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.61 KB, patch)
2022-07-05 20:09 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: DO NOT PUSH - Schema Updates (2.30 KB, patch)
2022-07-05 20:09 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (995 bytes, patch)
2022-07-05 20:10 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.44 KB, patch)
2022-07-05 20:10 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.83 KB, patch)
2022-07-05 20:10 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.15 KB, patch)
2022-07-05 20:10 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (34.29 KB, patch)
2022-07-05 20:10 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.09 KB, patch)
2022-07-05 20:10 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when apprropriate (2.91 KB, patch)
2022-07-05 20:10 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog (14.13 KB, patch)
2022-07-05 20:10 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.61 KB, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DO NOT PUSH - Schema Updates (2.30 KB, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (995 bytes, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.44 KB, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.83 KB, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.15 KB, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (37.68 KB, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.09 KB, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when apprropriate (2.91 KB, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog (14.13 KB, patch)
2022-07-18 13:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.58 KB, patch)
2022-08-02 13:45 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DO NOT PUSH - Schema Updates (2.30 KB, patch)
2022-08-02 13:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (995 bytes, patch)
2022-08-02 13:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.44 KB, patch)
2022-08-02 13:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.48 KB, patch)
2022-08-02 13:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.15 KB, patch)
2022-08-02 13:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (37.68 KB, patch)
2022-08-02 13:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.09 KB, patch)
2022-08-02 13:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when apprropriate (2.91 KB, patch)
2022-08-02 13:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog (14.13 KB, patch)
2022-08-02 13:46 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.58 KB, patch)
2022-08-29 14:20 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DO NOT PUSH - Schema Updates (2.30 KB, patch)
2022-08-29 14:20 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (995 bytes, patch)
2022-08-29 14:20 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.44 KB, patch)
2022-08-29 14:21 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.48 KB, patch)
2022-08-29 14:21 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.08 KB, patch)
2022-08-29 14:21 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (37.68 KB, patch)
2022-08-29 14:21 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.09 KB, patch)
2022-08-29 14:21 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when apprropriate (2.91 KB, patch)
2022-08-29 14:21 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog (11.66 KB, patch)
2022-08-29 14:21 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.58 KB, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DO NOT PUSH - Schema Updates (2.30 KB, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (995 bytes, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.44 KB, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.48 KB, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.08 KB, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (37.68 KB, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.09 KB, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when apprropriate (2.96 KB, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog (11.66 KB, patch)
2022-10-03 10:27 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.64 KB, patch)
2022-10-04 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: DO NOT PUSH - Schema Updates (2.37 KB, patch)
2022-10-04 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (1.04 KB, patch)
2022-10-04 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.50 KB, patch)
2022-10-04 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.55 KB, patch)
2022-10-04 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.15 KB, patch)
2022-10-04 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (37.75 KB, patch)
2022-10-04 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.15 KB, patch)
2022-10-04 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when apprropriate (3.02 KB, patch)
2022-10-04 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog (11.73 KB, patch)
2022-10-04 15:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Remove re-introduced file (2.33 KB, patch)
2022-10-04 15:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Relocate 'Save' (3.36 KB, patch)
2022-10-04 15:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Improve model structure (4.07 KB, patch)
2022-10-04 15:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.75 KB, patch)
2022-10-05 11:25 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DO NOT PUSH - Schema Updates (2.47 KB, patch)
2022-10-05 11:25 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (1.14 KB, patch)
2022-10-05 11:25 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.61 KB, patch)
2022-10-05 11:25 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.66 KB, patch)
2022-10-05 11:25 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.25 KB, patch)
2022-10-05 11:25 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (37.85 KB, patch)
2022-10-05 11:25 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.26 KB, patch)
2022-10-05 11:26 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when appropriate (3.13 KB, patch)
2022-10-05 11:26 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog (11.83 KB, patch)
2022-10-05 11:26 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Remove re-introduced file (2.33 KB, patch)
2022-10-05 11:26 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Relocate 'Save' (3.36 KB, patch)
2022-10-05 11:26 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Improve model structure (4.07 KB, patch)
2022-10-05 11:26 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.82 KB, patch)
2022-10-06 14:26 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: DBIC schema (2.34 KB, patch)
2022-10-06 14:26 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (1.20 KB, patch)
2022-10-06 14:26 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.68 KB, patch)
2022-10-06 14:26 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.72 KB, patch)
2022-10-06 14:26 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.31 KB, patch)
2022-10-06 14:26 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (37.92 KB, patch)
2022-10-06 14:27 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.31 KB, patch)
2022-10-06 14:27 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when appropriate (3.19 KB, patch)
2022-10-06 14:27 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog (11.90 KB, patch)
2022-10-06 14:27 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Remove re-introduced file (2.39 KB, patch)
2022-10-06 14:27 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Relocate 'Save' (3.42 KB, patch)
2022-10-06 14:27 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Improve model structure (4.12 KB, patch)
2022-10-06 14:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: Minor fixes (1.38 KB, patch)
2022-10-06 14:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) DB changes (5.06 KB, patch)
2022-10-06 14:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Spec cleanup (9.43 KB, patch)
2022-10-06 14:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Escape things, make them translatable (3.01 KB, patch)
2022-10-06 14:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: Follow-up for bug 25375 (1.63 KB, patch)
2022-10-06 14:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: (follow-up) Use x instead of X (2.39 KB, patch)
2022-10-06 14:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: DB Updates (11.80 KB, patch)
2022-10-21 13:33 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: DBIC schema (2.34 KB, patch)
2022-10-21 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Update schema for boolean (1.20 KB, patch)
2022-10-21 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add API route for SearchFilters (29.66 KB, patch)
2022-10-21 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add search filters to staff and opac interfaces (16.71 KB, patch)
2022-10-21 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Handle search filters in query builders (3.31 KB, patch)
2022-10-21 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add admin page for filters and ability to edit/save existing filters (37.45 KB, patch)
2022-10-21 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Unit tests (4.31 KB, patch)
2022-10-21 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Display search filters admin links when appropriate (3.18 KB, patch)
2022-10-21 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog (11.89 KB, patch)
2022-10-21 13:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Remove re-introduced file (2.39 KB, patch)
2022-10-21 13:35 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Relocate 'Save' (3.42 KB, patch)
2022-10-21 13:35 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Improve model structure (4.12 KB, patch)
2022-10-21 13:35 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: Minor fixes (1.38 KB, patch)
2022-10-21 13:35 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) DB changes (5.06 KB, patch)
2022-10-21 13:35 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Spec cleanup (9.42 KB, patch)
2022-10-21 13:35 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Escape things, make them translatable (3.01 KB, patch)
2022-10-21 13:35 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) adjust tests for bug 25375 (1.65 KB, patch)
2022-10-21 13:35 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Use x instead of X (2.39 KB, patch)
2022-10-21 13:35 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (follow-up) Adjust for RM follow-ups (4.38 KB, patch)
2022-10-21 13:36 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 17170: (QA follow-up) Adjust t/Koha/Auth/Permissions.t (1.09 KB, patch)
2022-10-24 12:12 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17170: (follow-up) Hide existing filters section if no filters exist (2.64 KB, patch)
2022-10-24 12:45 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2016-08-23 15:32:32 UTC
Work to be done:

1) Add a button to save a given search after it is performed.
2) Add a table and administrative area to add searches manually, allowing the description and "Display in OPAC?" to be saved and edited.
3) Add these saved searches to the advanced search and results pages in the OPAC and staff side.

Use case:
Librarian searches for materials by certain collection codes which define and age range (Early readers, picture books, etc.) they save this search

Patron searching for 'Vampires' gets many results

They can add the 'saved search' to their current search to retrieve only relevant records

Patron finds books for small children about vampires
Comment 1 Nick Clemens (kidclamp) 2022-04-13 15:07:23 UTC
Created attachment 133263 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature
Comment 2 Nick Clemens (kidclamp) 2022-04-13 15:07:28 UTC
Created attachment 133264 [details] [review]
Bug 17170: DO NOT PUSH - Schema Updates
Comment 3 Nick Clemens (kidclamp) 2022-04-13 15:07:31 UTC
Created attachment 133265 [details] [review]
Bug 17170: Update schema for boolean
Comment 4 Nick Clemens (kidclamp) 2022-04-13 15:07:36 UTC
Created attachment 133266 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests
Comment 5 Nick Clemens (kidclamp) 2022-04-13 15:07:39 UTC
Created attachment 133267 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets
Comment 6 Nick Clemens (kidclamp) 2022-04-13 15:07:44 UTC
Created attachment 133268 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings
Comment 7 Nick Clemens (kidclamp) 2022-04-13 15:07:47 UTC
Created attachment 133269 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page
Comment 8 Nick Clemens (kidclamp) 2022-04-13 15:07:51 UTC
Created attachment 133270 [details] [review]
Bug 17170: Unit tests
Comment 9 Andrew Fuerste-Henry 2022-04-15 16:30:31 UTC
A user with manage_search_filters permission can create filters from the search results page and can open admin-home.pl, but does not get a link to the search filters page. A superlibrarian does get the intended link.
Comment 10 Nick Clemens (kidclamp) 2022-04-15 16:39:42 UTC
Created attachment 133361 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when apprropriate
Comment 11 Andrew Fuerste-Henry 2022-04-15 18:43:15 UTC
Something off about how saved filters are getting parsed here. We're ANDing where we should OR.

I created a filter limiting to item types Book (BK) and Music (MU).

If I search for "Street" and then apply my filter, I get no results.
'street'  with limit(s): '(itype:("BK")) AND (itype:("MU"))'

If I clicked to edit my filter from the admin page and then search for "street" from that page, I get 4 results.
'street'  with limit(s): 'itype:(("BK") OR ("MU"))'

If I just construct an advanced search for "street" limited to book and music I get 4 results.
'(street*)' with limit(s): 'itype:(("BK") OR ("MU"))'.
Comment 12 Nick Clemens (kidclamp) 2022-04-18 14:57:28 UTC
Created attachment 133376 [details] [review]
Bug 17170: (follow-up) Correct handling of limits in ES

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure is more complex, so we handle the pieces
individually

Additionally I add more tests to cover other cases
Comment 13 Nick Clemens (kidclamp) 2022-07-01 16:30:39 UTC
Created attachment 137027 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature
Comment 14 Nick Clemens (kidclamp) 2022-07-01 16:30:44 UTC
Created attachment 137028 [details] [review]
Bug 17170: DO NOT PUSH - Schema Updates
Comment 15 Nick Clemens (kidclamp) 2022-07-01 16:30:47 UTC
Created attachment 137029 [details] [review]
Bug 17170: Update schema for boolean
Comment 16 Nick Clemens (kidclamp) 2022-07-01 16:30:51 UTC
Created attachment 137030 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests
Comment 17 Nick Clemens (kidclamp) 2022-07-01 16:30:55 UTC
Created attachment 137031 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets
Comment 18 Nick Clemens (kidclamp) 2022-07-01 16:30:59 UTC
Created attachment 137032 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings
Comment 19 Nick Clemens (kidclamp) 2022-07-01 16:31:03 UTC
Created attachment 137033 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page
Comment 20 Nick Clemens (kidclamp) 2022-07-01 16:31:06 UTC
Created attachment 137034 [details] [review]
Bug 17170: Unit tests
Comment 21 Nick Clemens (kidclamp) 2022-07-01 16:31:10 UTC
Created attachment 137035 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when apprropriate
Comment 22 Nick Clemens (kidclamp) 2022-07-01 16:31:14 UTC
Created attachment 137036 [details] [review]
Bug 17170: (follow-up) Correct handling of limits in ES

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure is more complex, so we handle the pieces
individually

Additionally I add more tests to cover other cases
Comment 23 Michal Urban 2022-07-05 20:09:53 UTC
Created attachment 137186 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature
Comment 24 Michal Urban 2022-07-05 20:09:57 UTC
Created attachment 137187 [details] [review]
Bug 17170: DO NOT PUSH - Schema Updates
Comment 25 Michal Urban 2022-07-05 20:10:00 UTC
Created attachment 137188 [details] [review]
Bug 17170: Update schema for boolean
Comment 26 Michal Urban 2022-07-05 20:10:05 UTC
Created attachment 137189 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests
Comment 27 Michal Urban 2022-07-05 20:10:10 UTC
Created attachment 137190 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets
Comment 28 Michal Urban 2022-07-05 20:10:14 UTC
Created attachment 137191 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings
Comment 29 Michal Urban 2022-07-05 20:10:18 UTC
Created attachment 137192 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page
Comment 30 Michal Urban 2022-07-05 20:10:23 UTC
Created attachment 137193 [details] [review]
Bug 17170: Unit tests
Comment 31 Michal Urban 2022-07-05 20:10:26 UTC
Created attachment 137194 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when apprropriate
Comment 32 Michal Urban 2022-07-05 20:10:30 UTC
Created attachment 137195 [details] [review]
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the results page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Comment 33 Katrin Fischer 2022-07-15 19:41:15 UTC
Hi Nick, this sounds really ineresting! Could you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 17170: (follow-up) Correct handling of limits in ES
error: sha1 information is lacking or useless (C4/Search.pm).
error: could not build fake ancestor
Patch failed at 0001 Bug 17170: (follow-up) Correct handling of limits in ES
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-17170-follow-up-Correct-handling-of-limits-in--3qL2M9.patch
Comment 34 Nick Clemens (kidclamp) 2022-07-18 13:32:02 UTC
Created attachment 137808 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature
Comment 35 Nick Clemens (kidclamp) 2022-07-18 13:32:06 UTC
Created attachment 137809 [details] [review]
Bug 17170: DO NOT PUSH - Schema Updates
Comment 36 Nick Clemens (kidclamp) 2022-07-18 13:32:10 UTC
Created attachment 137810 [details] [review]
Bug 17170: Update schema for boolean
Comment 37 Nick Clemens (kidclamp) 2022-07-18 13:32:14 UTC
Created attachment 137811 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests
Comment 38 Nick Clemens (kidclamp) 2022-07-18 13:32:18 UTC
Created attachment 137812 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets
Comment 39 Nick Clemens (kidclamp) 2022-07-18 13:32:22 UTC
Created attachment 137813 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings
Comment 40 Nick Clemens (kidclamp) 2022-07-18 13:32:27 UTC
Created attachment 137814 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page
Comment 41 Nick Clemens (kidclamp) 2022-07-18 13:32:31 UTC
Created attachment 137815 [details] [review]
Bug 17170: Unit tests
Comment 42 Nick Clemens (kidclamp) 2022-07-18 13:32:35 UTC
Created attachment 137816 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when apprropriate
Comment 43 Nick Clemens (kidclamp) 2022-07-18 13:32:39 UTC
Created attachment 137817 [details] [review]
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the results page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Comment 44 Nick Clemens (kidclamp) 2022-08-02 13:45:55 UTC
Created attachment 138505 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature
Comment 45 Nick Clemens (kidclamp) 2022-08-02 13:46:00 UTC
Created attachment 138506 [details] [review]
Bug 17170: DO NOT PUSH - Schema Updates
Comment 46 Nick Clemens (kidclamp) 2022-08-02 13:46:05 UTC
Created attachment 138507 [details] [review]
Bug 17170: Update schema for boolean
Comment 47 Nick Clemens (kidclamp) 2022-08-02 13:46:09 UTC
Created attachment 138508 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests
Comment 48 Nick Clemens (kidclamp) 2022-08-02 13:46:13 UTC
Created attachment 138509 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets
Comment 49 Nick Clemens (kidclamp) 2022-08-02 13:46:17 UTC
Created attachment 138510 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings
Comment 50 Nick Clemens (kidclamp) 2022-08-02 13:46:21 UTC
Created attachment 138511 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page
Comment 51 Nick Clemens (kidclamp) 2022-08-02 13:46:25 UTC
Created attachment 138512 [details] [review]
Bug 17170: Unit tests
Comment 52 Nick Clemens (kidclamp) 2022-08-02 13:46:29 UTC
Created attachment 138513 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when apprropriate
Comment 53 Nick Clemens (kidclamp) 2022-08-02 13:46:33 UTC
Created attachment 138514 [details] [review]
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the results page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Comment 54 Katrin Fischer 2022-08-27 14:13:35 UTC
Sorry for being too late again :( Can you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 17170: DB Updates
Applying: Bug 17170: DO NOT PUSH - Schema Updates
Applying: Bug 17170: Update schema for boolean
Applying: Bug 17170: Add API route for SearchFilters
Applying: Bug 17170: Add search filters to staff and opac interfaces
Applying: Bug 17170: Handle search filters in query builders
error: sha1 information is lacking or useless (C4/Search.pm).
error: could not build fake ancestor
Patch failed at 0001 Bug 17170: Handle search filters in query builders
Comment 55 Nick Clemens (kidclamp) 2022-08-29 14:20:41 UTC
Created attachment 139948 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature
Comment 56 Nick Clemens (kidclamp) 2022-08-29 14:20:49 UTC
Created attachment 139949 [details] [review]
Bug 17170: DO NOT PUSH - Schema Updates
Comment 57 Nick Clemens (kidclamp) 2022-08-29 14:20:55 UTC
Created attachment 139950 [details] [review]
Bug 17170: Update schema for boolean
Comment 58 Nick Clemens (kidclamp) 2022-08-29 14:21:00 UTC
Created attachment 139951 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests
Comment 59 Nick Clemens (kidclamp) 2022-08-29 14:21:07 UTC
Created attachment 139952 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets
Comment 60 Nick Clemens (kidclamp) 2022-08-29 14:21:14 UTC
Created attachment 139953 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings
Comment 61 Nick Clemens (kidclamp) 2022-08-29 14:21:20 UTC
Created attachment 139954 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page
Comment 62 Nick Clemens (kidclamp) 2022-08-29 14:21:28 UTC
Created attachment 139955 [details] [review]
Bug 17170: Unit tests
Comment 63 Nick Clemens (kidclamp) 2022-08-29 14:21:33 UTC
Created attachment 139956 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when apprropriate
Comment 64 Nick Clemens (kidclamp) 2022-08-29 14:21:39 UTC
Created attachment 139957 [details] [review]
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the results page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Comment 65 Katrin Fischer 2022-10-02 22:45:18 UTC
Sorry to repeat history here :( Too late again.

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 17170: DB Updates
Applying: Bug 17170: DO NOT PUSH - Schema Updates
Applying: Bug 17170: Update schema for boolean
Applying: Bug 17170: Add API route for SearchFilters
Applying: Bug 17170: Add search filters to staff and opac interfaces
Applying: Bug 17170: Handle search filters in query builders
Applying: Bug 17170: Add admin page for filters and ability to edit/save existing filters
Applying: Bug 17170: Unit tests
Applying: Bug 17170: (follow-up) Display search filters admin links when apprropriate
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc).
error: could not build fake ancestor
Patch failed at 0001 Bug 17170: (follow-up) Display search filters admin links when apprropriate
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-17170-follow-up-Display-search-filters-admin-l-O7ZVwo.patch
Comment 66 Nick Clemens (kidclamp) 2022-10-03 10:27:00 UTC
Created attachment 141228 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature
Comment 67 Nick Clemens (kidclamp) 2022-10-03 10:27:04 UTC
Created attachment 141229 [details] [review]
Bug 17170: DO NOT PUSH - Schema Updates
Comment 68 Nick Clemens (kidclamp) 2022-10-03 10:27:09 UTC
Created attachment 141230 [details] [review]
Bug 17170: Update schema for boolean
Comment 69 Nick Clemens (kidclamp) 2022-10-03 10:27:14 UTC
Created attachment 141231 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests
Comment 70 Nick Clemens (kidclamp) 2022-10-03 10:27:18 UTC
Created attachment 141232 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets
Comment 71 Nick Clemens (kidclamp) 2022-10-03 10:27:23 UTC
Created attachment 141233 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings
Comment 72 Nick Clemens (kidclamp) 2022-10-03 10:27:28 UTC
Created attachment 141234 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page
Comment 73 Nick Clemens (kidclamp) 2022-10-03 10:27:33 UTC
Created attachment 141235 [details] [review]
Bug 17170: Unit tests
Comment 74 Nick Clemens (kidclamp) 2022-10-03 10:27:38 UTC
Created attachment 141236 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when apprropriate
Comment 75 Nick Clemens (kidclamp) 2022-10-03 10:27:42 UTC
Created attachment 141237 [details] [review]
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the results page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Comment 76 Martin Renvoize 2022-10-04 15:56:09 UTC
Created attachment 141316 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 77 Martin Renvoize 2022-10-04 15:56:15 UTC
Created attachment 141317 [details] [review]
Bug 17170: DO NOT PUSH - Schema Updates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 78 Martin Renvoize 2022-10-04 15:56:20 UTC
Created attachment 141318 [details] [review]
Bug 17170: Update schema for boolean

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 79 Martin Renvoize 2022-10-04 15:56:27 UTC
Created attachment 141319 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 80 Martin Renvoize 2022-10-04 15:56:33 UTC
Created attachment 141320 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 81 Martin Renvoize 2022-10-04 15:56:38 UTC
Created attachment 141321 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 82 Martin Renvoize 2022-10-04 15:56:44 UTC
Created attachment 141322 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 83 Martin Renvoize 2022-10-04 15:56:50 UTC
Created attachment 141323 [details] [review]
Bug 17170: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 84 Martin Renvoize 2022-10-04 15:56:56 UTC
Created attachment 141324 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when apprropriate

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 85 Martin Renvoize 2022-10-04 15:57:04 UTC
Created attachment 141325 [details] [review]
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the results page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 86 Martin Renvoize 2022-10-04 15:57:10 UTC
Created attachment 141326 [details] [review]
Bug 17170: (QA follow-up) Remove re-introduced file

We reintroduced the definitions api spec file with this patch.. it's not
required.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 87 Martin Renvoize 2022-10-04 15:57:16 UTC
Created attachment 141327 [details] [review]
Bug 17170: (QA follow-up) Relocate 'Save'

Another minor rebase issue I believe.. relocate the 'Save search as
filter' link back up to sit next to 'Edit this search'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 88 Martin Renvoize 2022-10-04 15:57:21 UTC
Created attachment 141328 [details] [review]
Bug 17170: (QA follow-up) Improve model structure

This feature is awesome, but it's modals all feel a bit off.. this is an
improvement to one of them, but far from perfect.

I opt to work with Owen to create a guideline (and template) for modals going
forward and let this patchset go in as is.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 89 Martin Renvoize 2022-10-04 16:00:20 UTC
The core code here works well.. though we managed to slip parts of it into master already in bug 30528.. oops.

Anyway.. QA wise I'm actually pretty happy it all works as designed and doesn't introduce any regressions... but there GUI elements so far are pretty ugly and strangely formed..

I started working through some of them, but as the final patch says, I think we may be better of pushing this as is and then working Owen and I working togeter to create some nice templates and a guideline for modal based forms going forward.. and then use this feature to apply/test our idea's on their own bug.

As such.. Passing QA
Comment 90 Katrin Fischer 2022-10-04 20:12:09 UTC
Nick, just to let you know: I am back, but Martin was faster! ;)
Comment 91 Nick Clemens (kidclamp) 2022-10-05 11:25:24 UTC
Created attachment 141348 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 92 Nick Clemens (kidclamp) 2022-10-05 11:25:30 UTC
Created attachment 141349 [details] [review]
Bug 17170: DO NOT PUSH - Schema Updates

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 93 Nick Clemens (kidclamp) 2022-10-05 11:25:36 UTC
Created attachment 141350 [details] [review]
Bug 17170: Update schema for boolean

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 94 Nick Clemens (kidclamp) 2022-10-05 11:25:42 UTC
Created attachment 141351 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 95 Nick Clemens (kidclamp) 2022-10-05 11:25:48 UTC
Created attachment 141352 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 96 Nick Clemens (kidclamp) 2022-10-05 11:25:53 UTC
Created attachment 141353 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 97 Nick Clemens (kidclamp) 2022-10-05 11:25:59 UTC
Created attachment 141354 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 98 Nick Clemens (kidclamp) 2022-10-05 11:26:04 UTC
Created attachment 141355 [details] [review]
Bug 17170: Unit tests

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 99 Nick Clemens (kidclamp) 2022-10-05 11:26:09 UTC
Created attachment 141356 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when appropriate

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 100 Nick Clemens (kidclamp) 2022-10-05 11:26:14 UTC
Created attachment 141357 [details] [review]
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the results page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 101 Nick Clemens (kidclamp) 2022-10-05 11:26:19 UTC
Created attachment 141358 [details] [review]
Bug 17170: (QA follow-up) Remove re-introduced file

We reintroduced the definitions api spec file with this patch.. it's not
required.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 102 Nick Clemens (kidclamp) 2022-10-05 11:26:25 UTC
Created attachment 141359 [details] [review]
Bug 17170: (QA follow-up) Relocate 'Save'

Another minor rebase issue I believe.. relocate the 'Save search as
filter' link back up to sit next to 'Edit this search'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 103 Nick Clemens (kidclamp) 2022-10-05 11:26:31 UTC
Created attachment 141360 [details] [review]
Bug 17170: (QA follow-up) Improve model structure

This feature is awesome, but it's modals all feel a bit off.. this is an
improvement to one of them, but far from perfect.

I opt to work with Owen to create a guideline (and template) for modals going
forward and let this patchset go in as is.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 104 Tomás Cohen Arazi 2022-10-06 14:26:15 UTC
Created attachment 141422 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 105 Tomás Cohen Arazi 2022-10-06 14:26:22 UTC
Created attachment 141423 [details] [review]
Bug 17170: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 106 Tomás Cohen Arazi 2022-10-06 14:26:30 UTC
Created attachment 141424 [details] [review]
Bug 17170: Update schema for boolean

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 107 Tomás Cohen Arazi 2022-10-06 14:26:38 UTC
Created attachment 141425 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 108 Tomás Cohen Arazi 2022-10-06 14:26:47 UTC
Created attachment 141426 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 109 Tomás Cohen Arazi 2022-10-06 14:26:55 UTC
Created attachment 141427 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 110 Tomás Cohen Arazi 2022-10-06 14:27:03 UTC
Created attachment 141428 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 111 Tomás Cohen Arazi 2022-10-06 14:27:13 UTC
Created attachment 141429 [details] [review]
Bug 17170: Unit tests

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 112 Tomás Cohen Arazi 2022-10-06 14:27:27 UTC
Created attachment 141430 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when appropriate

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 113 Tomás Cohen Arazi 2022-10-06 14:27:39 UTC
Created attachment 141431 [details] [review]
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the results page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 114 Tomás Cohen Arazi 2022-10-06 14:27:51 UTC
Created attachment 141432 [details] [review]
Bug 17170: (QA follow-up) Remove re-introduced file

We reintroduced the definitions api spec file with this patch.. it's not
required.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 115 Tomás Cohen Arazi 2022-10-06 14:27:59 UTC
Created attachment 141433 [details] [review]
Bug 17170: (QA follow-up) Relocate 'Save'

Another minor rebase issue I believe.. relocate the 'Save search as
filter' link back up to sit next to 'Edit this search'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 116 Tomás Cohen Arazi 2022-10-06 14:28:09 UTC
Created attachment 141434 [details] [review]
Bug 17170: (QA follow-up) Improve model structure

This feature is awesome, but it's modals all feel a bit off.. this is an
improvement to one of them, but far from perfect.

I opt to work with Owen to create a guideline (and template) for modals going
forward and let this patchset go in as is.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 117 Tomás Cohen Arazi 2022-10-06 14:28:18 UTC
Created attachment 141435 [details] [review]
Bug 17170: Minor fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 118 Tomás Cohen Arazi 2022-10-06 14:28:27 UTC
Created attachment 141436 [details] [review]
Bug 17170: (QA follow-up) DB changes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 119 Tomás Cohen Arazi 2022-10-06 14:28:35 UTC
Created attachment 141437 [details] [review]
Bug 17170: (QA follow-up) Spec cleanup

This patch removes not required (for now) query parameters as we can
query using q= on those. They can be added back eventually, if needed.

Attributes now match the database as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 120 Tomás Cohen Arazi 2022-10-06 14:28:43 UTC
Created attachment 141438 [details] [review]
Bug 17170: (QA follow-up) Escape things, make them translatable

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 121 Tomás Cohen Arazi 2022-10-06 14:46:27 UTC
Created attachment 141461 [details] [review]
Bug 17170: Follow-up for bug 25375

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 122 Tomás Cohen Arazi 2022-10-06 14:46:36 UTC
Created attachment 141462 [details] [review]
Bug 17170: (follow-up) Use x instead of X

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 123 Nick Clemens (kidclamp) 2022-10-21 13:33:58 UTC
Created attachment 142365 [details] [review]
Bug 17170: DB Updates

This patch adds the new table, permission, and a syspref to enable the feature

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 124 Nick Clemens (kidclamp) 2022-10-21 13:34:05 UTC
Created attachment 142367 [details] [review]
Bug 17170: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 125 Nick Clemens (kidclamp) 2022-10-21 13:34:12 UTC
Created attachment 142368 [details] [review]
Bug 17170: Update schema for boolean

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 126 Nick Clemens (kidclamp) 2022-10-21 13:34:21 UTC
Created attachment 142369 [details] [review]
Bug 17170: Add API route for SearchFilters

This adds the API routes and tests

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 127 Nick Clemens (kidclamp) 2022-10-21 13:34:28 UTC
Created attachment 142370 [details] [review]
Bug 17170: Add search filters to staff and opac interfaces

This patch displays the filters on the results pages with the facets

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 128 Nick Clemens (kidclamp) 2022-10-21 13:34:34 UTC
Created attachment 142371 [details] [review]
Bug 17170: Handle search filters in query builders

This patch updates the query building code to expand filters when searching
and pass them back as part of the cgi and descriptive search strings

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 129 Nick Clemens (kidclamp) 2022-10-21 13:34:42 UTC
Created attachment 142372 [details] [review]
Bug 17170: Add admin page for filters and ability to edit/save existing filters

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the resuilts page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 130 Nick Clemens (kidclamp) 2022-10-21 13:34:47 UTC
Created attachment 142373 [details] [review]
Bug 17170: Unit tests

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 131 Nick Clemens (kidclamp) 2022-10-21 13:34:53 UTC
Created attachment 142374 [details] [review]
Bug 17170: (follow-up) Display search filters admin links when appropriate

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 132 Nick Clemens (kidclamp) 2022-10-21 13:34:59 UTC
Created attachment 142375 [details] [review]
Bug 17170: Add the ability to create 'saved searches' for use as filters when searching the catalog

This patch alters the code in the ES QueryBuilder. Reflecting
how things are handled in build_query_compat we clean the query,
but not the limits. In Zebra we simply recursivly call buildQuery,
but the ES query structure

This patchset adds a new ability to save searches on the staff client, and display them in the results
page on staff or opac as a new filter.

New filters can be added from the results page after a search, and there is an admin page for updating
deleting and renaming filters

There is a new permission to control management of these filters

New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter

Due to bug 30528 testing in ES is recommended

To test:
 1 - Apply patches and update database and restart all
 2 - Enable new system preference 'SavedSearchFilters'
 3 - As superlibrarian perform a search in staff client, something broad like 'a'
 4 - Note new 'Save search as filter' link on results page
 5 - Click it, save search as new filter, check 'Staff client' visibility
 6 - Perform another search
 7 - Note the filter now appears above facets
 8 - Click to it filter results
 9 - Note results are limited by the new filter, and it is checked in the facets
10 - Confirm click the [x] removes the filter
11 - Go to administration->search filters
12 - Confirm the filter appears
13 - Edit and mark as OPAC visible
14 - Test OPAC to ensure it shows and can be applied/removed
15 - Copy URL with filter applied
16 - In adminsitration mark filter as not visible on staff or opac
17 - Confirm link above still works
18 - Create a new staff with catalogue and search filters permission
19 - Ensure they can access/save filters
20 - Remove filter permission and ensure they cannot
21 - Disable system preference
22 - Confirm links to search filters page are removed from admin home and admin sidebar
23 - Confirm filters do not appear on results and cannot be created
24 - Enable pref
25 - Create a filter
26 - From search filters page, click 'Edit search'
27 - Confirm you are taken to advanced search page letting you know which filter you are editing
28 - Confirm you can change searhc options and save
29 - Confirm you can perform the search from this page

Sponsored-by: Sponsored by: Round Rock Public Library [https://www.roundrocktexas.gov/departments/library/]

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 133 Nick Clemens (kidclamp) 2022-10-21 13:35:05 UTC
Created attachment 142376 [details] [review]
Bug 17170: (QA follow-up) Remove re-introduced file

We reintroduced the definitions api spec file with this patch.. it's not
required.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 134 Nick Clemens (kidclamp) 2022-10-21 13:35:11 UTC
Created attachment 142377 [details] [review]
Bug 17170: (QA follow-up) Relocate 'Save'

Another minor rebase issue I believe.. relocate the 'Save search as
filter' link back up to sit next to 'Edit this search'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 135 Nick Clemens (kidclamp) 2022-10-21 13:35:17 UTC
Created attachment 142378 [details] [review]
Bug 17170: (QA follow-up) Improve model structure

This feature is awesome, but it's modals all feel a bit off.. this is an
improvement to one of them, but far from perfect.

I opt to work with Owen to create a guideline (and template) for modals going
forward and let this patchset go in as is.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 136 Nick Clemens (kidclamp) 2022-10-21 13:35:24 UTC
Created attachment 142379 [details] [review]
Bug 17170: Minor fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 137 Nick Clemens (kidclamp) 2022-10-21 13:35:31 UTC
Created attachment 142380 [details] [review]
Bug 17170: (QA follow-up) DB changes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 138 Nick Clemens (kidclamp) 2022-10-21 13:35:36 UTC
Created attachment 142381 [details] [review]
Bug 17170: (QA follow-up) Spec cleanup

This patch removes not required (for now) query parameters as we can
query using q= on those. They can be added back eventually, if needed.

Attributes now match the database as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 139 Nick Clemens (kidclamp) 2022-10-21 13:35:43 UTC
Created attachment 142382 [details] [review]
Bug 17170: (QA follow-up) Escape things, make them translatable

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 140 Nick Clemens (kidclamp) 2022-10-21 13:35:49 UTC
Created attachment 142383 [details] [review]
Bug 17170: (follow-up) adjust tests for bug 25375

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 141 Nick Clemens (kidclamp) 2022-10-21 13:35:55 UTC
Created attachment 142384 [details] [review]
Bug 17170: (follow-up) Use x instead of X

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 142 Nick Clemens (kidclamp) 2022-10-21 13:36:01 UTC
Created attachment 142385 [details] [review]
Bug 17170: (follow-up) Adjust for RM follow-ups

Use direct DB names when saving/loading
Don't escape boolean values as strings
Comment 143 Tomás Cohen Arazi 2022-10-21 14:46:27 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 144 Jonathan Druart 2022-10-21 15:56:33 UTC
Dropdown empty in modal: https://snipboard.io/Nnab3I.jpg
Comment 145 Jonathan Druart 2022-10-21 15:58:44 UTC
You can save a search even if not displayed at OPAC or staff, is that expected?
Comment 146 Jonathan Druart 2022-10-21 16:03:55 UTC
A filter that is not displayed at the OPAC can still be used if you modify the id in the URL.
Comment 147 Nick Clemens (kidclamp) 2022-10-21 16:50:48 UTC
(In reply to Jonathan Druart from comment #145)
> You can save a search even if not displayed at OPAC or staff, is that
> expected?

Yes, noted in feature:
New filters can be added that are not displayed along with facets, this allows for building custom links
using these filters to keep URLs shorter
Comment 148 Nick Clemens (kidclamp) 2022-10-21 16:51:47 UTC
(In reply to Jonathan Druart from comment #146)
> A filter that is not displayed at the OPAC can still be used if you modify
> the id in the URL.

You could perform the search yourself anyways, I do not think it reveals any data
Comment 149 Tomás Cohen Arazi 2022-10-24 12:12:27 UTC
Created attachment 142494 [details] [review]
Bug 17170: (QA follow-up) Adjust t/Koha/Auth/Permissions.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 150 Nick Clemens (kidclamp) 2022-10-24 12:45:58 UTC
Created attachment 142498 [details] [review]
Bug 17170: (follow-up) Hide existing filters section if no filters exist
Comment 151 Caroline Cyr La Rose 2023-04-24 20:27:47 UTC
I added some stuff to the manual. Hopefully I didn't get it completely wrong. I admit I didn't quite understand the use case for the URL thing, so I didn't add that in. But if someone has a specific example, feel free to add it in, or tell me and I'll add it.
Comment 152 Katrin Fischer 2023-05-03 22:35:22 UTC
(In reply to Caroline Cyr La Rose from comment #151)
> I added some stuff to the manual. Hopefully I didn't get it completely
> wrong. I admit I didn't quite understand the use case for the URL thing, so
> I didn't add that in. But if someone has a specific example, feel free to
> add it in, or tell me and I'll add it.

Do you mean the part about keeping URLs shorter?
Comment 153 Nick Clemens (kidclamp) 2023-05-04 11:03:55 UTC
(In reply to Katrin Fischer from comment #152)
> (In reply to Caroline Cyr La Rose from comment #151)
> > I added some stuff to the manual. Hopefully I didn't get it completely
> > wrong. I admit I didn't quite understand the use case for the URL thing, so
> > I didn't add that in. But if someone has a specific example, feel free to
> > add it in, or tell me and I'll add it.
> 
> Do you mean the part about keeping URLs shorter?

It's really just kind of a convenience, so you could create a 'New books search' and save it, but not select to display it as a filter, but then you could add a link:

<a href="http://localhost:8080/cgi-bin/koha/opac-search.pl?limit=search_filter:1">New books</a>

For a more complicated search, say "Picture books" / subject: Christmas / location: Children's room / Available Only

It just provides a shorter more readable link
Comment 154 Caroline Cyr La Rose 2023-05-04 12:10:45 UTC
Thank you Nick! That helps :) I will add that example.

I think maybe I misunderstood how to use the filters. Because in the OPAC, you need to do a search to get the filters, so in the test plan when it says to copy the URL, it's the URL for search + filter, not just filter. It gave me something like cgi-bin/koha/opac-search.pl?idx=&q=shakespeare&limit=search_filter:4

Anyway, now I have the URL you gave me, so it's all good. Ill put that in the manual with the new books example.
Comment 155 Nick Clemens (kidclamp) 2023-05-04 12:15:22 UTC
(In reply to Caroline Cyr La Rose from comment #154)
> Thank you Nick! That helps :) I will add that example.
> 
> I think maybe I misunderstood how to use the filters. Because in the OPAC,
> you need to do a search to get the filters, so in the test plan when it says
> to copy the URL, it's the URL for search + filter, not just filter. It gave
> me something like
> cgi-bin/koha/opac-search.pl?idx=&q=shakespeare&limit=search_filter:4
> 
> Anyway, now I have the URL you gave me, so it's all good. Ill put that in
> the manual with the new books example.

Yeah, it would be nice to provide the staff/opac link to the filter with no extra query in the filters list - you can file that and I'll try to get to it sometime