Bug 22605: Add ability to edit a search on staff interface
authorNick Clemens <nick@bywatersolutions.com>
Thu, 12 Aug 2021 15:28:40 +0000 (15:28 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 25 Mar 2022 00:22:09 +0000 (14:22 -1000)
commit90d658ae56fcd2ad0da8ed7ab2f37e48b038ef9a
treeb4f7de70721690ec88715475c632677fb35e0d7b
parentab495c64bdeacf5d4e911b574d1d719c7d7f3424
Bug 22605: Add ability to edit a search on staff interface

This patch adds the ability to parse the current search and populate the advanced search page on the staff side accordingly.
When searching you will now have an 'Edit this search' link underneath your current search terms

A few notes:
1 - Previous selected items appear with a checkbox, unchecking 'disables' them and removes from the search
2 - Facets and unrecognized limits will appear at the end of the form under 'Other limits' - there could be future enhancement to parse there better, but I believe this is sufficient for now
3 - Previously selected branch or group selections will populate the dropdowns, only one is allowed

To test:
1 - Perform a variety of search on the staff interface
2 - Confirm the 'edit search' button appear below your search
3 - Confirm that options are retained and correctly parsed
4 - Test with library groups - you should be able to combine groups after initial search, or remove individual libraries when editing
5 - Test that selecting a goup disables the individual libraries options

QA note: Missing filters on deletion of keys form hash are false positives

https://bugs.koha-community.org/show_bug.cgi?id=26605

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
catalogue/search.pl
koha-tmpl/intranet-tmpl/prog/en/includes/subtype_limits.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt