Bug 31271 - "Edit search" always resets search options to keyword
Summary: "Edit search" always resets search options to keyword
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 22605
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-30 15:24 UTC by Katrin Fischer
Modified: 2023-06-08 22:28 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 31271: Preselect previous search index (1.57 KB, patch)
2022-11-03 12:32 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 31271: Preselect previous search index (1.63 KB, patch)
2022-11-03 16:50 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 31271: Preselect previous search index (1.69 KB, patch)
2022-11-09 12:24 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2022-07-30 15:24:09 UTC
To test:
- Go to the advanced search in the staff interface
- Select Barcode as search option and search for a non-existing barcode
- From the search results, go back by Edit search link
- Verify the search option flipped back to Keyword :(
Comment 1 Jonathan Druart 2022-08-01 14:48:50 UTC
Is it a regression?
Comment 2 Jonathan Druart 2022-08-01 14:50:40 UTC
(In reply to Jonathan Druart from comment #1)
> Is it a regression?

Hum, guess no.
Comment 3 Donna 2022-10-25 16:10:50 UTC
I would argue it is a regression - in previous versions, when I click back to the advanced search to edit the search, the search options are retained.  The edit search button should do the same thing.  I can click the back arrow and the fields are retained, so having the behavior differ between using the "proper" edit link vs back arrow is rather frustrating.
Comment 4 Katrin Fischer 2022-10-25 21:04:30 UTC
I also felt like I had tested this when the edit link was added... Adding Nick.
Comment 5 Nick Clemens 2022-11-03 12:32:15 UTC
Created attachment 143086 [details] [review]
Bug 31271: Preselect previous search index

This patch passes the constructed value of the preselect to search_indexes.inc

To test:
1 - Perform an advanced search, making sure to select different indexes
2 - Click 'Edit search' on results page
3 - Confirm index selections are preselected
4 - Enable  IntranetCatalogSearchPulldown
5 - Do a search form the top bar using an index
6 - Confirm 'Edit search' correctly popluates the chosen index
Comment 6 Andrew Fuerste-Henry 2022-11-03 16:50:13 UTC
Created attachment 143139 [details] [review]
Bug 31271: Preselect previous search index

This patch passes the constructed value of the preselect to search_indexes.inc

To test:
1 - Perform an advanced search, making sure to select different indexes
2 - Click 'Edit search' on results page
3 - Confirm index selections are preselected
4 - Enable  IntranetCatalogSearchPulldown
5 - Do a search form the top bar using an index
6 - Confirm 'Edit search' correctly popluates the chosen index

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Comment 7 Katrin Fischer 2022-11-09 12:24:01 UTC
Created attachment 143496 [details] [review]
Bug 31271: Preselect previous search index

This patch passes the constructed value of the preselect to search_indexes.inc

To test:
1 - Perform an advanced search, making sure to select different indexes
2 - Click 'Edit search' on results page
3 - Confirm index selections are preselected
4 - Enable  IntranetCatalogSearchPulldown
5 - Do a search form the top bar using an index
6 - Confirm 'Edit search' correctly popluates the chosen index

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Tomás Cohen Arazi 2022-11-09 13:06:39 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!