Bug 36509 - Add option to search authority records by ID
Summary: Add option to search authority records by ID
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-03 20:35 UTC by Aleisha Amohia
Modified: 2024-08-05 19:13 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
[WIP] Bug 36509: Add Search ID tab to authorities search on staff interface (5.31 KB, patch)
2024-04-08 23:16 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36509: Add Search ID tab to authorities search on staff interface (6.12 KB, patch)
2024-04-10 03:42 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36509: Add Search ID tab to authorities search on staff interface (6.18 KB, patch)
2024-05-26 21:31 UTC, Aleisha Amohia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2024-04-03 20:35:46 UTC

    
Comment 1 Aleisha Amohia 2024-04-08 23:16:48 UTC
Created attachment 164524 [details] [review]
[WIP] Bug 36509: Add Search ID tab to authorities search on staff interface
Comment 2 Aleisha Amohia 2024-04-10 03:42:46 UTC
Created attachment 164576 [details] [review]
Bug 36509: Add Search ID tab to authorities search on staff interface

This patch makes use of the existing local-number index on the 001 authority field so that authority records can be searched using the 001 ID.

This patch works for both Elasticsearch and Zebra search engines.

To test:

1. Spin up your ktd with elasticsearch `ktd --es7 up`
2. In the staff interface, open up Koha Administration and search for the SearchEngine system preference. It should be set to Elasticsearch.
3. In another tab, open the staff interface and go to Authorities.
4. Do a normal authorities search, confirm that when you expand the dropdown to order by 'none', the results appear to be in authority-ID ascending order.
5. Choose an ID and go to new the Search ID tab. Search for your ID, confirm it shows as expected.
6. Back in the Koha Administration tab, change the SearchEngine to Zebra.
7. In your Authorities tab, refresh the page.
8. Repeat step 5 and confirm that you can search for the authority by its ID again.

Sponsored-by: Education Services Australia SCIS
Comment 3 David Nind 2024-05-25 00:20:15 UTC
The patch no longer applies 8-(...

git bz apply 36509

Bug 36509 - Add option to search authority records by ID

164576 - Bug 36509: Add Search ID tab to authorities search on staff interface

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 36509: Add Search ID tab to authorities search on staff interface
Using index info to reconstruct a base tree...
M	Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
M	admin/searchengine/elasticsearch/mappings.yaml
M	koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc
Auto-merging admin/searchengine/elasticsearch/mappings.yaml
Auto-merging Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 36509: Add Search ID tab to authorities search on staff interface
Comment 4 Aleisha Amohia 2024-05-26 21:31:31 UTC
Created attachment 167184 [details] [review]
Bug 36509: Add Search ID tab to authorities search on staff interface

This patch makes use of the existing local-number index on the 001 authority field so that authority records can be searched using the 001 ID.

This patch works for both Elasticsearch and Zebra search engines.

To test:

1. Spin up your ktd with elasticsearch `ktd --es7 up`
2. In the staff interface, open up Koha Administration and search for the SearchEngine system preference. It should be set to Elasticsearch.
3. In another tab, open the staff interface and go to Authorities.
4. Do a normal authorities search, confirm that when you expand the dropdown to order by 'none', the results appear to be in authority-ID ascending order.
5. Choose an ID and go to new the Search ID tab. Search for your ID, confirm it shows as expected.
6. Back in the Koha Administration tab, change the SearchEngine to Zebra.
7. In your Authorities tab, refresh the page.
8. Repeat step 5 and confirm that you can search for the authority by its ID again.

Sponsored-by: Education Services Australia SCIS
Comment 5 David Nind 2024-05-27 21:58:10 UTC
Thanks for fixing the patch so that it applies!

I can't get this to work with Elasticsearch (both --es7 and --es8) (I also tried a reset mapping, and reindex).

However, it does work in Zebra.