We format the search as a title phrase 77$a + 77$t like so: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=ti,phr:AAAAAAAAAAAA%20%20TTTTTTTTTTTTTTtt Looking at the documentation, field A is 'Main entry heading' and usually the author: https://www.oclc.org/bibformats/en/7xx/775.html https://www.oclc.org/bibformats/en/7xx/76x-78x.html#subfielda So we likely need to form a title and author search instead
Created attachment 151770 [details] [review] Bug 32695: Use title (subfield t) only for 'Other editions' search links Currently the code does a title phrase search, but combines the title field with the Main Entry (author) field. This patch simply limits the search to the title to ensure links work To test: 1 - Ensure systme preference 'UseControlNumber' is set to don't 2 - Edit Default MARC framework in administration->Marc frameworks 3 - Make 775 subfields a & t visible in editor 4 - Edit a record to add a field 775 with subfields a & t that match another title/author in your system 5 - Save the record and view the details page 6 - Click the other editions link - no results 7 - Apply patch, restart_all 8 - Reload details and confirm the link works
Hi Nick, please check the patch, it contains files that don't belong in there: installer/data/mysql/atomicupdate/bug_33117.pl | 2 +- .../prog/en/modules/admin/preferences/circulation.pref | 8 ++++---- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 +- .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 2 +- members/member.pl | 2 +- Also because of those the patch currently doesn't apply.
Created attachment 151860 [details] [review] Bug 32695: Use title (subfield t) only for 'Other editions' search links Currently the code does a title phrase search, but combines the title field with the Main Entry (author) field. This patch simply limits the search to the title to ensure links work To test: 1 - Ensure systme preference 'UseControlNumber' is set to don't 2 - Edit Default MARC framework in administration->Marc frameworks 3 - Make 775 subfields a & t visible in editor 4 - Edit a record to add a field 775 with subfields a & t that match another title/author in your system 5 - Save the record and view the details page 6 - Click the other editions link - no results 7 - Apply patch, restart_all 8 - Reload details and confirm the link works
Created attachment 151884 [details] [review] Bug 32695: Use title (subfield t) only for 'Other editions' search links Currently the code does a title phrase search, but combines the title field with the Main Entry (author) field. This patch simply limits the search to the title to ensure links work To test: 1 - Ensure systme preference 'UseControlNumber' is set to don't 2 - Edit Default MARC framework in administration->Marc frameworks 3 - Make 775 subfields a & t visible in editor 4 - Edit a record to add a field 775 with subfields a & t that match another title/author in your system 5 - Save the record and view the details page 6 - Click the other editions link - no results 7 - Apply patch, restart_all 8 - Reload details and confirm the link works Signed-off-by: Sam Lau <samalau@gmail.com>
We have a better solution already implemented for one of other 7xx where we do a combined search with ti and au. I'll try to provide a patch.
Created attachment 152239 [details] [review] Bug 32695: Use title (subfield t) only for 'Other editions' search links Currently the code does a title phrase search, but combines the title field with the Main Entry (author) field. This patch simply limits the search to the title to ensure links work To test: 1 - Ensure systme preference 'UseControlNumber' is set to don't 2 - Edit Default MARC framework in administration->Marc frameworks 3 - Make 775 subfields a & t visible in editor 4 - Edit a record to add a field 775 with subfields a & t that match another title/author in your system 5 - Save the record and view the details page 6 - Click the other editions link - no results 7 - Apply patch, restart_all 8 - Reload details and confirm the link works Signed-off-by: Sam Lau <samalau@gmail.com>
Created attachment 152240 [details] [review] Bug 32695: Fix search strings for 775, 780, 785 and 787 In the past due to some misunderstanding of the MARC standard we built the search links for these fields using $a and $t with the title index. But we actually need to search $t as title and $a as author. This patch fixes the templates for the MARC 7xx fields: * 775 * 780 * 785 * 787 To test: * Ensure systme preference 'UseControlNumber' is set to don't * Create a record with the linking fields above * Look at the OPAC and staff interface detail views * Verify the content of your fields shows and the links combine a+t as a title search * Apply patch * Verify you have nicely formatted links now Example: 775 _ _ ‡asomeone‡ttitle775 780 0 2 ‡asomeone‡ttitle780 785 0 2 ‡asomeone‡ttitle785 787 _ _ ‡ilabel:‡ttitle787‡asomeone
Katrin, just a doubt: is the commit: Bug 32695: Use title (subfield t) only for 'Other editions' search links really needed here in this patch? In your second commit you are cancelling the creation of the variable f775, so the change "a_t -> t" disappears completely...
Yet another remark - in MARC21slim2intranetDetail.xsl, after the patch being applied, in the line 1934 (... when test="$UseControlNumber = '1'...) a variable $f787 is being used, but is now not defined.
Created attachment 161167 [details] [review] Bug 32695: Use title (subfield t) only for 'Other editions' search links Currently the code does a title phrase search, but combines the title field with the Main Entry (author) field. This patch simply limits the search to the title to ensure links work To test: 1 - Ensure systme preference 'UseControlNumber' is set to don't 2 - Edit Default MARC framework in administration->Marc frameworks 3 - Make 775 subfields a & t visible in editor 4 - Edit a record to add a field 775 with subfields a & t that match another title/author in your system 5 - Save the record and view the details page 6 - Click the other editions link - no results 7 - Apply patch, restart_all 8 - Reload details and confirm the link works Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Sabrina Kiehl <kiehl@mpis.mpg.de>
Created attachment 161168 [details] [review] Bug 32695: Fix search strings for 775, 780, 785 and 787 In the past due to some misunderstanding of the MARC standard we built the search links for these fields using $a and $t with the title index. But we actually need to search $t as title and $a as author. This patch fixes the templates for the MARC 7xx fields: * 775 * 780 * 785 * 787 To test: * Ensure systme preference 'UseControlNumber' is set to don't * Create a record with the linking fields above * Look at the OPAC and staff interface detail views * Verify the content of your fields shows and the links combine a+t as a title search * Apply patch * Verify you have nicely formatted links now Example: 775 _ _ ‡asomeone‡ttitle775 780 0 2 ‡asomeone‡ttitle780 785 0 2 ‡asomeone‡ttitle785 787 _ _ ‡ilabel:‡ttitle787‡asomeone Signed-off-by: Sabrina Kiehl <kiehl@mpis.mpg.de>
Hi, For MARC 787 the search string was already formed as intended (ti,phr:("title") AND au:("creator")) before applying the patch. After applying the patch the search string is a combined with subfield t in ti,phr index and subfield a in au index. If subfield a is empty the search string is formed : ti,phr:("title") If subfield t is empty the search string is formed: ti,phr:("") AND au:("creator") Which seems okay to me, because I can't think of a cataloguing situation in which subfield t could be empty and only subfield a is used. I just want to mention it.
Please provide feedback first on comment8 and comment9.
Created attachment 165147 [details] [review] Bug 32695: Fix search strings for 775, 780, 785 and 787 In the past due to some misunderstanding of the MARC standard we built the search links for these fields using $a and $t with the title index. But we actually need to search $t as title and $a as author. This patch fixes the templates for the MARC 7xx fields: * 775 * 780 * 785 * 787 To test: * Ensure systme preference 'UseControlNumber' is set to don't * Create a record with the linking fields above * Look at the OPAC and staff interface detail views * Verify the content of your fields shows and the links combine a+t as a title search * Apply patch * Verify you have nicely formatted links now Example: 775 _ _ ‡asomeone‡ttitle775 780 0 2 ‡asomeone‡ttitle780 785 0 2 ‡asomeone‡ttitle785 787 _ _ ‡ilabel:‡ttitle787‡asomeone Signed-off-by: Sabrina Kiehl <kiehl@mpis.mpg.de>
Created attachment 165148 [details] Test marc record Just a marc record with fields with both or either tag to see how all the links form,
(In reply to Marcel de Rooy from comment #13) > Please provide feedback first on comment8 and comment9. Squashed, addressed, and added a test record
Created attachment 165234 [details] [review] Bug 32695: Fix search strings for 775, 780, 785 and 787 In the past due to some misunderstanding of the MARC standard we built the search links for these fields using $a and $t with the title index. But we actually need to search $t as title and $a as author. This patch fixes the templates for the MARC 7xx fields: * 775 * 780 * 785 * 787 To test: * Ensure systme preference 'UseControlNumber' is set to don't * Create a record with the linking fields above * Look at the OPAC and staff interface detail views * Verify the content of your fields shows and the links combine a+t as a title search * Apply patch * Verify you have nicely formatted links now Example: 775 _ _ ‡asomeone‡ttitle775 780 0 2 ‡asomeone‡ttitle780 785 0 2 ‡asomeone‡ttitle785 787 _ _ ‡ilabel:‡ttitle787‡asomeone Signed-off-by: Sabrina Kiehl <kiehl@mpis.mpg.de> Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. Used the sample record. 2. For the Audio Cassettes, CDs (SR) framework, needed to edit the framework and make: . the $a and $t subfields visible in the editor for the 775, 780, 785, and 787 tags; . the $i subfield visible in the editor for 787 3. See below for the before and after labels and links: . Now seem to be correct . For 787 - $i displayed correctly, no change to the actual query Label and links before: Other editions: someone title775 (link = search.pl?q=ti,phr:someone%20title775) Supersedes: someone title780 (link = search.pl?q=ti,phr:someone%20title780) Superseded by: someone title785 (link = search.pl?q=ti,phr:someone%20title785) Other related works: label:: someone title787 (link = search.pl?q=ti%2Cphr%3A(%22title787%22)%20AND%20au%3A(%22someone%22)) Label and links after: Other editions: someone title775 (catalogue/search.pl?q=ti%2Cphr%3A(%22title775%22)%20AND%20au%3A(%22someone%22)) Supersedes: someone title780 (catalogue/search.pl?q=ti%2Cphr%3A(%22title780%22)%20AND%20au%3A(%22someone%22)) Superseded by: someone title785 (search.pl?q=ti%2Cphr%3A(%22title785%22)%20AND%20au%3A(%22someone%22)) Other related works: label: someone title787 (search.pl?q=ti%2Cphr%3A(%22title787%22)%20AND%20au%3A(%22someone%22))
Created attachment 165365 [details] [review] Bug 32695: Fix search strings for 775, 780, 785 and 787 In the past due to some misunderstanding of the MARC standard we built the search links for these fields using $a and $t with the title index. But we actually need to search $t as title and $a as author. This patch fixes the templates for the MARC 7xx fields: * 775 * 780 * 785 * 787 To test: * Ensure systme preference 'UseControlNumber' is set to don't * Create a record with the linking fields above * Look at the OPAC and staff interface detail views * Verify the content of your fields shows and the links combine a+t as a title search * Apply patch * Verify you have nicely formatted links now Example: 775 _ _ ‡asomeone‡ttitle775 780 0 2 ‡asomeone‡ttitle780 785 0 2 ‡asomeone‡ttitle785 787 _ _ ‡ilabel:‡ttitle787‡asomeone Signed-off-by: Sabrina Kiehl <kiehl@mpis.mpg.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All appears to work as desired and issues worked out. Passing QA
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.06
Backported to 23.05.x for upcoming 23.05.12