Bug 37244 - Selecting home library or holding library facet changes library dropdown
Summary: Selecting home library or holding library facet changes library dropdown
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Andreas Jonsson
QA Contact: Matt Blenkinsop
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-03 13:11 UTC by Andreas Jonsson
Modified: 2024-12-06 06:56 UTC (History)
3 users (show)

See Also:
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. (2.64 KB, patch)
2024-07-03 13:16 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 37244: Facets should not impact library pulldown. (2.70 KB, patch)
2024-07-03 22:13 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 37244: Facets should not impact library pulldown. (2.78 KB, patch)
2024-07-04 15:19 UTC, Matt Blenkinsop
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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