Bug 10793 - XSLT change 780/785 search queries to use ti,phr indexes like other linking entries
Summary: XSLT change 780/785 search queries to use ti,phr indexes like other linking e...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-28 01:54 UTC by David Cook
Modified: 2014-12-07 20:02 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10793 - XSLT change 780/785 search queries to use ti,phr indexes like other linking entries (4.43 KB, patch)
2013-08-28 02:03 UTC, David Cook
Details | Diff | Splinter Review
Bug 10793 - XSLT change 780/785 search queries to use ti,phr indexes like other linking entries (4.52 KB, patch)
2013-09-07 07:04 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 10793 - XSLT change 780/785 search queries to use ti,phr indexes like other linking entries (4.60 KB, patch)
2013-09-07 19:35 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2013-08-28 01:54:20 UTC
Currently, the 780 (preceding entry)/785 (continuing entry) fields in the XSLT are using a plain "q=" search, while other linking entries like 773 (host item) and 775 (other edition) use the ti,phr indexes like so "q=ti,phr:".

This bug seeks to change it so that the 780 and 785 fields use the ti,phr indexes for searching as well, since the search queries are populated using the "title" or "main entry heading" subfields.
Comment 1 David Cook 2013-08-28 02:03:30 UTC Comment hidden (obsolete)
Comment 2 David Cook 2013-09-06 05:18:35 UTC
Just changing this away from an enhancement to "minor" as it's really more of a bug fix than an enhancement.
Comment 3 Chris Cormack 2013-09-07 07:04:34 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2013-09-07 19:35:53 UTC
Created attachment 20860 [details] [review]
[PASSED QA] Bug 10793 - XSLT change 780/785 search queries to use ti,phr indexes like other linking entries

This patch adds the ti,phr index to the search queries for the 780
and 785 MARC fields in the XSLT templates.

Test Plan:

1) Use a record with 780 and 785 MARC fields with data in the "a" or
"t" subfields. (You might need to add these fields to an existing
record, or create a new record. You might also need to change your
MARC Bibliographic Framework settings to not "hide" these fields in
your framework(s)).

N.B. The data in the "a" or "t" subfields should be a title that
exists in your database. Otherwise, this test might seem misleading.

2) Set the system preferences "XSLTDetailsDisplay" and
"OPACXSLTDetailsDisplay" to "default".

3) Go to your record (which contains the 780/785 fields), and look
for links with linktext derived from the "a" or "t" fields in the
record. These may or may not be prefaced with labels such as
"Continued by" or "Continues".

4) Note that the links are formatted "q=TITLE". Click this link
and note the possibly high number of results.

5) APPLY THE PATCH

6) Shift+Refresh your record page, and observe that the link should
now say "q=ti,phr:TITLE". Click this link and note that you are
either taken directly to the referenced article or that your
search results are considerably fewer.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
XSLT change only, no regressions found.
Comment 5 Katrin Fischer 2013-09-07 19:36:02 UTC
Just a note: To my knowledge phrase searches don't work
over multiple subfields without additional work/DOM. 
This patch will create a search string like:
ti,phr:<$a><$t>. This seems to produce relevant results, but
might not always be as precise as intended.
Comment 6 Galen Charlton 2013-09-07 21:01:17 UTC
Pushed to master.  Thanks, David!

A version of this might be applicable to the NORMARC stylesheets.
Comment 7 Tomás Cohen Arazi 2013-10-07 18:07:09 UTC
This patch has been pushed to 3.12.x, will be in 3.12.6.

Thanks David!
Comment 8 Bernardo Gonzalez Kriegel 2013-10-13 22:52:13 UTC
Pushed to 3.10.x, will be in 3.10.12