Summary: | Fix mapping call number searches to Z39.50 | ||
---|---|---|---|
Product: | Koha | Reporter: | Phil Ringnalda <phil> |
Component: | Searching | Assignee: | Phil Ringnalda <phil> |
Status: | Pushed to oldstable --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37168 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes how the Z39.50 search form is populated when using the Z39.50/SRU search option, from advanced search results in the staff interface where a "Call number" search is made. It now autofills the searched for value in the "Dewey" field instead of the "Title" field.
(Even though the field is labelled "Dewey", it also searches for Library of Congress call numbers in the 050 tag. Note that there are other issues with the search form, the labels used, and what is actually searched for - there are separate bugs for these).
|
Version(s) released in: |
24.11.00,24.05.06,23.11.11
|
Circulation function: | |||
Attachments: |
Bug 37167: Fix mapping call number searches to Z39.50
Bug 37167: Fix mapping call number searches to Z39.50 Bug 37167: Fix mapping call number searches to Z39.50 |
Description
Phil Ringnalda
2024-06-24 04:26:43 UTC
Created attachment 168048 [details] [review] Bug 37167: Fix mapping call number searches to Z39.50 When you do an advanced search for call number, your search uses the index callnum, but the code that maps your search to a possible Z39.50 search still uses the index lcn,phr which was last used 15 years ago, so it's treated as an unknown index and mapped to the Title field in the Z39.50 search form. Test plan: 1. Click Search in the top menu to load Advanced Search 2. Change the dropdown menu for the first input from Keyword to Call Number, and paste TT174.3 in the input and search 3. Find the Z39.50/SRU search button in your results and click it 4. Note that your search was filled in the Title field 5. Apply patch, reset_all 6. Repeat steps 1-3, note that your search was filled in the Dewey field 7. Choose the server Library of Congress SRU and search 8. Note that even though we labelled it Dewey and you searched for an LC call number, your results are things with that call number in 050, the LC call number field. Filed bug 37168 for fixing the inaccurate "Dewey" label. Created attachment 168183 [details] [review] Bug 37167: Fix mapping call number searches to Z39.50 When you do an advanced search for call number, your search uses the index callnum, but the code that maps your search to a possible Z39.50 search still uses the index lcn,phr which was last used 15 years ago, so it's treated as an unknown index and mapped to the Title field in the Z39.50 search form. Test plan: 1. Click Search in the top menu to load Advanced Search 2. Change the dropdown menu for the first input from Keyword to Call Number, and paste TT174.3 in the input and search 3. Find the Z39.50/SRU search button in your results and click it 4. Note that your search was filled in the Title field 5. Apply patch, reset_all 6. Repeat steps 1-3, note that your search was filled in the Dewey field 7. Choose the server Library of Congress SRU and search 8. Note that even though we labelled it Dewey and you searched for an LC call number, your results are things with that call number in 050, the LC call number field. Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. For step 5, only a restart_all is required. I reset_all all the time when I mean restart_all, I'd be surprised if that's the first time I've done it in a test plan :) (In reply to Phil Ringnalda from comment #5) > I reset_all all the time when I mean restart_all, I'd be surprised if that's > the first time I've done it in a test plan :) No problem! Sometimes (very occasionally I find) a reset_all is required. I just add the testing notes for my future self, but they may be of use to others as well. Created attachment 168263 [details] [review] Bug 37167: Fix mapping call number searches to Z39.50 When you do an advanced search for call number, your search uses the index callnum, but the code that maps your search to a possible Z39.50 search still uses the index lcn,phr which was last used 15 years ago, so it's treated as an unknown index and mapped to the Title field in the Z39.50 search form. Test plan: 1. Click Search in the top menu to load Advanced Search 2. Change the dropdown menu for the first input from Keyword to Call Number, and paste TT174.3 in the input and search 3. Find the Z39.50/SRU search button in your results and click it 4. Note that your search was filled in the Title field 5. Apply patch, reset_all 6. Repeat steps 1-3, note that your search was filled in the Dewey field 7. Choose the server Library of Congress SRU and search 8. Note that even though we labelled it Dewey and you searched for an LC call number, your results are things with that call number in 050, the LC call number field. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thanks for the quick work here Phil, All working as described. Passing QA Dewey is better than title for sure, but we are pretending that all libraries use Dewey. In Germany almost no library uses Dewey. Even in the US some might be using LOC I think? I wonder if this automatism really makes sense or won't be a nuisance for some libraries that would prefer if there was no auto-fill at all? Not sure what we could do, to make this smarter. Just pondering to maybe result in a new bug with some ideas on how to make this a bit smarter. Conveniently, Dewey isn't Dewey, it's actually LC. It would have been cleaner if I discovered everything broken with this feature before I filed the first bug or wrote the first patch, but since no generic call number search actually exists in Z39.50, bug 37168 is heading toward making this prefill keyword, making Dewey actually search Dewey, and people who know their callnum search was for either LC or Dewey can copy-paste from keyword to the appropriate flavor, while people with call numbers that are neither can leave it in keyword. Pushed for 24.11! Well done everyone, thank you! Preferring no auto-fill at all is easy: don't do a call number search and then continue to Z39.50 from the results of that search :) Replace via Z39.50 doesn't prefill call numbers, there's nothing in biblio/biblioitems from which they could, so this only comes up if you explicitly say in advanced search that you are searching call number, and then go to Z39.50 from those results rather than going to Cataloging - New from Z39.50 when you've given up on your search results and want to start from scratch. Backported to 24.05.x for upcoming 24.05.06 Pushed to 23.11.x for 23.11.11 |