Bug 24690 - Make OPACPopupAuthorsSearch work with search terms containing parenthesis
Summary: Make OPACPopupAuthorsSearch work with search terms containing parenthesis
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 13327
Blocks:
  Show dependency treegraph
 
Reported: 2020-02-20 07:05 UTC by Katrin Fischer
Modified: 2024-07-02 00:55 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the OPAC so that when OPACPopupAuthorsSearch is enabled, author names not linked to an authority record that have parenthesis (for example, Criterion Collection (Firm)) correctly return results. Previously, author names with parenthesis did not return search results.
Version(s) released in:


Attachments
Bug 24690: Make OPACPopupAuthorsSearch work with search terms containing parenthesis (2.17 KB, patch)
2024-07-01 14:11 UTC, Owen Leonard
Details | Diff | Splinter Review
MARC file containing records for testing (9.08 KB, text/plain)
2024-07-01 14:13 UTC, Owen Leonard
Details
Bug 24690: Make OPACPopupAuthorsSearch work with search terms containing parenthesis (2.22 KB, patch)
2024-07-02 00:49 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-02-20 07:05:36 UTC
As noted in bug 13327 this feature doesn't work when the selected search terms contain (). No results will be found.
Comment 1 Owen Leonard 2024-07-01 14:11:48 UTC
Created attachment 168315 [details] [review]
Bug 24690: Make OPACPopupAuthorsSearch work with search terms containing parenthesis

This patch updates the OPACPopupAuthorSearch feature so that it wraps
search terms with quotes. This is the behavior we have in place for
author searches outside the context of OPACPopupAuthorSearch, e.g.
'au:"Criterion Collection (Firm)"'

To test, apply the patch and enable the OPACPopupAuthorSearch system
preference.

- Search for a record in the OPAC which has author data containing
  parentheses (it should not be a field linked to an authority record).
- View the detail page for that record.
- Click on one of the problematic author links.
- This should trigger a modal window with a list of authors and
  checkboxes for each.
- With just the single checkbox checked, click "Search."
- The search should return the correct results.
- Test other author searches to confirm that they work too.

Sponsored-by: Athens County Public Libraries
Comment 2 Owen Leonard 2024-07-01 14:13:40 UTC
Created attachment 168316 [details]
MARC file containing records for testing

This file will give you records containing the author "Criterion Collection (firm)" (not an authority record link) with which to test
Comment 3 David Nind 2024-07-02 00:49:51 UTC
Created attachment 168334 [details] [review]
Bug 24690: Make OPACPopupAuthorsSearch work with search terms containing parenthesis

This patch updates the OPACPopupAuthorsSearch feature so that it wraps
search terms with quotes. This is the behavior we have in place for
author searches outside the context of OPACPopupAuthorisSearch, e.g.
'au:"Criterion Collection (Firm)"'

To test, apply the patch and enable the OPACPopupAuthorsSearch system
preference.

- Search for a record in the OPAC which has author data containing
  parentheses (it should not be a field linked to an authority record).
- View the detail page for that record.
- Click on one of the problematic author links.
- This should trigger a modal window with a list of authors and
  checkboxes for each.
- With just the single checkbox checked, click "Search."
- The search should return the correct results.
- Test other author searches to confirm that they work too.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2024-07-02 00:55:55 UTC
Testing notes (using KTD):

1. I amended the patch commit message - OPACPopupAuthorSearch ==> OPACPopupAuthorsSearch (added s for Authors).

2. Thanks for providing the sample records!