Bug 23122

Summary: When searching callnumber in simple search, search option is not retained
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, martin.renvoize, maryse.simard
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.02
Attachments: Bug 23122: When searching callnumber in simple search, search option is not retained
Bug 23122: When searching callnumber in simple search, search option is not retained
Bug 23122: When searching callnumber in simple search, search option is not retained
Bug 23122: When searching callnumber in simple search, search option is not retained
Bug 23122: When searching callnumber in simple search, search option is not retained

Description Katrin Fischer 2019-06-14 12:55:48 UTC
To test:

- Go to the OPAC
- Select callnumber from the search pull down on top
- Search for anything, 'test' will work
- Verify that the search option switches back to 'library catalog'
- Repeat with 'Series'
- Verfiy that search option is still 'Series' after sending search
Comment 1 Owen Leonard 2019-06-14 15:11:53 UTC
Created attachment 90603 [details] [review]
Bug 23122: When searching callnumber in simple search, search option is not retained

This patch copies some code and markup from the staff client where call
number phrase searches are correctly handled. A check for
'ms_callnumcommaphr' is copied from search_indexes.inc. Handling of
commas and dashes is copied from search.pl.

To test, apply the patch and make sure the
OpacAddMastheadLibraryPulldown system preference is enabled.

 - From the OPAC main page, select "Call number" from the search pull
   down at the top of the page.
 - Perform any search (it need not return results).
 - Verify that the search option retains the "Call number" selection.
 - Repeat the test with and without the OPACNumbersPreferPhrase system
   preference enabled.
Comment 2 Maryse Simard 2019-06-14 18:05:22 UTC
Created attachment 90615 [details] [review]
Bug 23122: When searching callnumber in simple search, search option is not retained

This patch copies some code and markup from the staff client where call
number phrase searches are correctly handled. A check for
'ms_callnumcommaphr' is copied from search_indexes.inc. Handling of
commas and dashes is copied from search.pl.

To test, apply the patch and make sure the
OpacAddMastheadLibraryPulldown system preference is enabled.

 - From the OPAC main page, select "Call number" from the search pull
   down at the top of the page.
 - Perform any search (it need not return results).
 - Verify that the search option retains the "Call number" selection.
 - Repeat the test with and without the OPACNumbersPreferPhrase system
   preference enabled.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 3 Nadine Pierre 2019-06-14 18:30:23 UTC
Created attachment 90624 [details] [review]
Bug 23122: When searching callnumber in simple search, search option is not retained

This patch copies some code and markup from the staff client where call
number phrase searches are correctly handled. A check for
'ms_callnumcommaphr' is copied from search_indexes.inc. Handling of
commas and dashes is copied from search.pl.

To test, apply the patch and make sure the
OpacAddMastheadLibraryPulldown system preference is enabled.

 - From the OPAC main page, select "Call number" from the search pull
   down at the top of the page.
 - Perform any search (it need not return results).
 - Verify that the search option retains the "Call number" selection.
 - Repeat the test with and without the OPACNumbersPreferPhrase system
   preference enabled.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Comment 4 Arthur Bousquet 2019-06-14 18:39:28 UTC
Created attachment 90626 [details] [review]
Bug 23122: When searching callnumber in simple search, search option is not retained

This patch copies some code and markup from the staff client where call
number phrase searches are correctly handled. A check for
'ms_callnumcommaphr' is copied from search_indexes.inc. Handling of
commas and dashes is copied from search.pl.

To test, apply the patch and make sure the
OpacAddMastheadLibraryPulldown system preference is enabled.

 - From the OPAC main page, select "Call number" from the search pull
   down at the top of the page.
 - Perform any search (it need not return results).
 - Verify that the search option retains the "Call number" selection.
 - Repeat the test with and without the OPACNumbersPreferPhrase system
   preference enabled.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Comment 5 Nick Clemens 2019-06-14 18:46:19 UTC
Created attachment 90627 [details] [review]
Bug 23122: When searching callnumber in simple search, search option is not retained

This patch copies some code and markup from the staff client where call
number phrase searches are correctly handled. A check for
'ms_callnumcommaphr' is copied from search_indexes.inc. Handling of
commas and dashes is copied from search.pl.

To test, apply the patch and make sure the
OpacAddMastheadLibraryPulldown system preference is enabled.

 - From the OPAC main page, select "Call number" from the search pull
   down at the top of the page.
 - Perform any search (it need not return results).
 - Verify that the search option retains the "Call number" selection.
 - Repeat the test with and without the OPACNumbersPreferPhrase system
   preference enabled.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Katrin Fischer 2019-06-15 20:53:53 UTC
Thanks Owen for the super quick fix!
Comment 7 Martin Renvoize 2019-06-19 12:17:00 UTC
Nice work!

Pushed to master for 19.11.00
Comment 8 Fridolin Somers 2019-07-15 13:24:31 UTC
Pushed to 19.05.x for 19.05.02