Bug 36509

Summary: Add option to search authority records by ID
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: SearchingAssignee: Aleisha Amohia <aleisha>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david, esther.melander, maxeinergl
Version: Main   
Hardware: All   
OS: All   
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
Bug 36509: Add Search ID tab to authorities search on staff interface
Bug 36509: Add Search ID tab to authorities search on staff interface

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.