Once we did an advanced search in the OPAC, we have have the option to modify the criterias of this last search ("Return to the last advanced search" just on top of the results list). But in the "on site" Koha we don't have this option. Wchich can save a lot of time when we have long and precise searches to do allowing to refine the criterias rather than enter all of them again. Thanks, Alexandre
By "on site" I mean staff interface. Thanks, Alexandre
Created attachment 114728 [details] [review] 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 - Library limits can be applied multiple times either as 'AND' option, or using groups for 'OR' 2 - Previous selected items appear with a checkbox, unchecking 'disables' them and removes from the search 3 - 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 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
I'm running into problems: - apply patch - restart all - go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl - search title: Street, get results (http://localhost:8081/cgi-bin/koha/catalogue/search.pl?advsearch=1&idx=ti&q=street&idx=kw&q=&idx=kw&q=&sort_by=relevance) - click Edit Search - go to page where my title is not shown in the search form but does appear in the url? (http://localhost:8081/cgi-bin/koha/catalogue/search.pl?advsearch=1&idx=ti&q=street&idx=kw&q=&idx=kw&q=&sort_by=relevance)
Additionally, the more I think about this the more I dislike adding this new wrinkle of and/or multi-branch searching as sort of an afterthought to this feature. I'd be happier to see that split into a separate bug, in hopes of it getting more eyes and feedback.
Created attachment 114734 [details] [review] 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 - Library limits can be applied multiple times either as 'AND' option, or using groups for 'OR' 2 - Previous selected items appear with a checkbox, unchecking 'disables' them and removes from the search 3 - 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 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
Created attachment 114736 [details] [review] 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 - Library limits can be applied multiple times either as 'AND' option, or using groups for 'OR' 2 - Previous selected items appear with a checkbox, unchecking 'disables' them and removes from the search 3 - 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 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 Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
We've implemented an "edit search" feature for years locally. It'll be interesting to see what this one is like...
Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 22605: Add ability to edit a search on staff interface .git/rebase-apply/patch:441: trailing whitespace. warning: 1 line adds whitespace errors. Using index info to reconstruct a base tree... M C4/Search.pm M Koha/SearchEngine/Elasticsearch/QueryBuilder.pm M catalogue/search.pl M koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt .git/rebase-apply/patch:441: trailing whitespace. warning: 1 line adds whitespace errors. Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt Auto-merging catalogue/search.pl Auto-merging Koha/SearchEngine/Elasticsearch/QueryBuilder.pm CONFLICT (content): Merge conflict in Koha/SearchEngine/Elasticsearch/QueryBuilder.pm Auto-merging C4/Search.pm
Created attachment 117174 [details] [review] 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 - Library limits can be applied multiple times either as 'AND' option, or using groups for 'OR' 2 - Previous selected items appear with a checkbox, unchecking 'disables' them and removes from the search 3 - 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 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 Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
I like the idea of this, but it seems to work less nicely than in the OPAC. Examples: 1) Publication date range search I used a date range search: 1900- On returning to the advanced search page the field is correctly prepopulated, but the search still shows with the other options as well: yr,st-numeric:1900- As this is a standard search option of the advanced search, I feel that should work a little better. 2) Multiple libraries section Lots of new text added, but I have no option to select anything? I feel like the GUI there is not working right now? Maybe multi-select of libraries should be a separate enhancement? 3) Filters missing FAIL koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt FAIL filters missing_filter at line 190 ( [% limits.delete( limit_key ) %]) missing_filter at line 228 ( [% limits.delete($year_limit_key) %]) missing_filter at line 247 ( [% limits.delete( langtype ) %]) missing_filter at line 280 ( [% limits.delete( subtype ) %]) missing_filter at line 371 ( [% limits.delete('branch') %]) missing_filter at line 392 ( [% limits.delete(key) %])
4) Text should be using library not branch(es) throughout.
Created attachment 119177 [details] [review] Bug 22605: (follow-up) Correct terminology and fix conditionals This patch hides the display of 'Multiple libraries' selection of no groups are defined and correct the use of the term libraries over branches I fix the key used to delete the year limit after filling the form
1) Fixed 2) Fixed, only displays if there are groups of libraries defined 3) These are false positives - they are lines removing the limits from the hash when prepopulating fields 4) Fixed
Created attachment 123816 [details] [review] 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
Created attachment 123839 [details] [review] 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
Created attachment 123840 [details] [review] 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
Created attachment 123965 [details] [review] 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>
Hi Nick, started retesting this: 1) Boolean opeators are not kept Starting with the advanced search in 'less options' mode. * Search for a simple keyword - OK * Add another keyword on the next input field - OK * When you return to search, it has switched from 'less' to 'more' - OKish * Switch the operator from and to not or or * When you return to serach, the operator has switched back to 'and' - BAD 2) Subtype search The subtype searches behave in a bit of an unexpected way: * Search for a set of the 4 subtypes * Return to serach - checkboxes appear instead of preselected pull-downs It looks like this will allow to search for more than one of each, but I feel like this might be better as a separate feature with a little more work. I see an issue in that you can't search multiple right away (or I didn't figure out how to). You have to add one audience... search... return... add another. That makes it a lot of clicks to add 3 options. For this feature... could we just go with making the right preselections on the pull downs and rethink the multiple option feature a bit more?
Created attachment 126746 [details] [review] 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>
Created attachment 126747 [details] [review] Bug 22605: (follow-up) Fix operators - Don't add an operator on first loop - Only add plus option on last loop - Fix indentation of first search box - Remove spaces from operators in query_cgi and add to query and query_desc
Created attachment 126748 [details] [review] Bug 22605: Preselect subtype limits and don't allow multiple Dropdowns moved to an include, checked and preseleced
I am sorry Nick, but the Audience sub type doesn't stick and I couldn't spot the mistake. Please also fix your missing TT filters.
Created attachment 126838 [details] [review] Bug 22605: (follow-up) Add selected to audience attributes
You didn't fix the missing TT filters... I will.
Created attachment 126851 [details] [review] Bug 22605: (QA follow-up) Add missing TT filters
Sorry, lucky find (or unlucky): From the formats pull down, Braille won't stick. I believe because it's a combined one: l-format:tc or l-format:fb Please keep my follow-up for the TT filters when attaching a follow-up!
Created attachment 126852 [details] [review] 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>
Created attachment 126853 [details] [review] Bug 22605: (follow-up) Fix operators - Don't add an operator on first loop - Only add plus option on last loop - Fix indentation of first search box - Remove spaces from operators in query_cgi and add to query and query_desc
Created attachment 126854 [details] [review] Bug 22605: Preselect subtype limits and don't allow multiple Dropdowns moved to an include, checked and preseleced
Created attachment 126855 [details] [review] Bug 22605: (follow-up) Add selected to audience attributes
Created attachment 126856 [details] [review] Bug 22605: (QA follow-up) Add missing TT filters
Created attachment 126857 [details] [review] Bug 22605: (QA follow-up) Make Braille search option stick To test: - Add to records, one with 007 fb and another with 007 tc - Search for Format: Braille from the advanced search - Verify both records are found - Return to advanced search - Verify that Braille is still selected - Rerun search - same results show
Created attachment 126858 [details] [review] 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>
Created attachment 126859 [details] [review] Bug 22605: (follow-up) Fix operators - Don't add an operator on first loop - Only add plus option on last loop - Fix indentation of first search box - Remove spaces from operators in query_cgi and add to query and query_desc Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 126860 [details] [review] Bug 22605: Preselect subtype limits and don't allow multiple Dropdowns moved to an include, checked and preseleced Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 126862 [details] [review] Bug 22605: (follow-up) Add selected to audience attributes Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 126863 [details] [review] Bug 22605: (QA follow-up) Add missing TT filters Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 126864 [details] [review] Bug 22605: (QA follow-up) Make Braille search option stick To test: - Add to records, one with 007 fb and another with 007 tc - Search for Format: Braille from the advanced search - Verify both records are found - Return to advanced search - Verify that Braille is still selected - Rerun search - same results show Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(In reply to Katrin Fischer from comment #37) > Created attachment 126863 [details] [review] [review] > Bug 22605: (QA follow-up) Add missing TT filters > > Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> I don't know if this is necessary - I think these are false warnings as the data is not displayed
(In reply to Nick Clemens from comment #39) > (In reply to Katrin Fischer from comment #37) > > Created attachment 126863 [details] [review] [review] [review] > > Bug 22605: (QA follow-up) Add missing TT filters > > > > Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > > I don't know if this is necessary - I think these are false warnings as the > data is not displayed Hm that could be, not insisting and leaving to Joubu. I only used the automatic scripts, that probably doesn't know about delete?
(In reply to Katrin Fischer from comment #40) > (In reply to Nick Clemens from comment #39) > > (In reply to Katrin Fischer from comment #37) > > > Created attachment 126863 [details] [review] [review] [review] [review] > > > Bug 22605: (QA follow-up) Add missing TT filters > > > > > > Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > > > > I don't know if this is necessary - I think these are false warnings as the > > data is not displayed > > Hm that could be, not insisting and leaving to Joubu. I only used the > automatic scripts, that probably doesn't know about delete? See bug 29350.
I am sorry, this one missed 21.11 (because of me, last week was crazy). There are too many changes in a controller with fragile code, I am not confident with doing an exception with these patches. Postponed.
Created attachment 131775 [details] [review] 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>
Created attachment 131776 [details] [review] Bug 22605: (follow-up) Fix operators - Don't add an operator on first loop - Only add plus option on last loop - Fix indentation of first search box - Remove spaces from operators in query_cgi and add to query and query_desc Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 131777 [details] [review] Bug 22605: Preselect subtype limits and don't allow multiple Dropdowns moved to an include, checked and preseleced Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 131778 [details] [review] Bug 22605: (follow-up) Add selected to audience attributes Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 131779 [details] [review] Bug 22605: (QA follow-up) Make Braille search option stick To test: - Add to records, one with 007 fb and another with 007 tc - Search for Format: Braille from the advanced search - Verify both records are found - Return to advanced search - Verify that Braille is still selected - Rerun search - same results show Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
QA tools shows : FAIL koha-tmpl/intranet-tmpl/prog/en/includes/subtype_limits.inc FAIL spelling Theses ==> These, thesis Theses ==> These, thesis But this is not caused by this bug. If valid create another bug report.
(In reply to Fridolin Somers from comment #48) > QA tools shows : > > FAIL koha-tmpl/intranet-tmpl/prog/en/includes/subtype_limits.inc > FAIL spelling > Theses ==> These, thesis > Theses ==> These, thesis > > But this is not caused by this bug. > If valid create another bug report. Ah heu yes it is created by this bug ^^ But this text is already used in actual master : koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt: <option value="ctype:m" >Theses</option> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt: <option value="ctype:m">Theses</option> So skip
Feature looks great. But I've opened Bug 30357 to improve the display.
*** Bug 27568 has been marked as a duplicate of this bug. ***
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
2 unit tests are failing because of changes in C4::Search https://jenkins.koha-community.org/view/master/job/Koha_Master_D10/560/ Fixed on master with patch : Bug 22605: (RM follow-up) Fix test suite
Thanks! Pushed to 21.11 for 21.11.12
The way this edit search handles limits is confusing in the UI... but maybe good enough... I should've upstreamed my local edit search years ago [U+1F605]
Already in the manual.