Bug 20277: Improve 773 link when $a is present
authorKatrin Fischer <katrin.fischer.83@web.de>
Sun, 22 Aug 2021 04:07:02 +0000 (04:07 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 19 Oct 2021 07:38:23 +0000 (09:38 +0200)
commit78db69fb569b0cf16656fcf092d8025df64fe943
tree363db1b962cdb791daf00ca3265b1beef0778ffd
parentbcb0dfd8adb4061dfd9886b3c4c98fd862a8b5fd
Bug 20277: Improve 773 link when $a is present

At the moment $t (Title) and $a (Main heading - author) are both
searched in ti,phr, which sometimes may work, as ti contains the
full 245 field, including $c with author information. But often
$c will not match what is in 100$a, so the search fails.

This splits the search string so we search for $t in with ti,phr
and for $a in au.

To test:
- Make sure UseControlnumber is deactivated
- Search for a record with an author in 100 in your catalog
  Example from sample data: Programming Perl / Tom Christiansen, Brian D. Foy & Larry Wall.
- Add a child record using New > Add child record
- Verify that in 773 $a and $t are filled in
- Complete mandatory fields and save the record
. In OPAC and staff interface:
- Verify the link in the detail page is doing a search with ti,phr
- Verify the link works/doesn't work (more likely the latter)
- Apply patch
- Verify the link has changed and (now) works

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl