Bug 37244

Summary: Selecting home library or holding library facet changes library dropdown
Product: Koha Reporter: Andreas Jonsson <andreas.jonsson>
Component: SearchingAssignee: Andreas Jonsson <andreas.jonsson>
Status: Pushed to oldoldstable --- QA Contact: Matt Blenkinsop <matt.blenkinsop>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, lucas, matt.blenkinsop
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06,23.11.11
Circulation function:
Attachments: Bug 37244: Facets should not impact library pulldown.
Bug 37244: Facets should not impact library pulldown.
Bug 37244: Facets should not impact library pulldown.

Description Andreas Jonsson 2024-07-03 13:11:00 UTC
When clicking on a facet for holding or home branch the branch limit in the corresponding library is inadvertedly selected in the library dropdown, in both staff interface and OPAC.
Comment 1 Andreas Jonsson 2024-07-03 13:16:54 UTC
Created attachment 168448 [details] [review]
Bug 37244: Facets should not impact library pulldown.

When parsing the branch limits the regular expression matches
parameters that contains the substring "branch:" rather than the prefix
"^branch:". Consequently, both prefixes homebranch: and holdingbranch:
triggers the branch limit.

Test plan:

- Activate the system preference  IntranetAddMastheadLibraryPulldown.
- In staff interface:
  - Perform a catalogue search (e.g. "book").
  - Click on a facet for holding library or home library
    (e.g. "Fairview").
  - Click on the "more options" icon in the search box and make sure
    that "All libraries" is selected.
- Activate the system preference  OpacAddMastheadLibraryPulldown
- In opac:
  - Perform a catalogue search (e.g. "book").
  - Click on a facet for holding library or home library
    (e.g. "Fairview").
  - Make sure "All libraries" is still selected in the dropdown next
    to the search input.
Comment 2 Chris Cormack 2024-07-03 22:13:38 UTC
Created attachment 168481 [details] [review]
Bug 37244: Facets should not impact library pulldown.

When parsing the branch limits the regular expression matches
parameters that contains the substring "branch:" rather than the prefix
"^branch:". Consequently, both prefixes homebranch: and holdingbranch:
triggers the branch limit.

Test plan:

- Activate the system preference  IntranetAddMastheadLibraryPulldown.
- In staff interface:
  - Perform a catalogue search (e.g. "book").
  - Click on a facet for holding library or home library
    (e.g. "Fairview").
  - Click on the "more options" icon in the search box and make sure
    that "All libraries" is selected.
- Activate the system preference  OpacAddMastheadLibraryPulldown
- In opac:
  - Perform a catalogue search (e.g. "book").
  - Click on a facet for holding library or home library
    (e.g. "Fairview").
  - Make sure "All libraries" is still selected in the dropdown next
    to the search input.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 3 Matt Blenkinsop 2024-07-04 15:19:13 UTC
Created attachment 168506 [details] [review]
Bug 37244: Facets should not impact library pulldown.

When parsing the branch limits the regular expression matches
parameters that contains the substring "branch:" rather than the prefix
"^branch:". Consequently, both prefixes homebranch: and holdingbranch:
triggers the branch limit.

Test plan:

- Activate the system preference  IntranetAddMastheadLibraryPulldown.
- In staff interface:
  - Perform a catalogue search (e.g. "book").
  - Click on a facet for holding library or home library
    (e.g. "Fairview").
  - Click on the "more options" icon in the search box and make sure
    that "All libraries" is selected.
- Activate the system preference  OpacAddMastheadLibraryPulldown
- In opac:
  - Perform a catalogue search (e.g. "book").
  - Click on a facet for holding library or home library
    (e.g. "Fairview").
  - Make sure "All libraries" is still selected in the dropdown next
    to the search input.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 4 Katrin Fischer 2024-07-05 13:50:32 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Lucas Gass (lukeg) 2024-11-18 17:48:24 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 6 Fridolin Somers 2024-12-06 06:56:24 UTC
Pushed to 23.11.x for 23.11.11