[Bug 5842] New: Cross-Reference links to authorized fields give incomplete search results
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5842 Bug #: 5842 Summary: Cross-Reference links to authorized fields give incomplete search results Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_4 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Searching AssignedTo: gmcharlt@gmail.com ReportedBy: jwagner@ptfs.com QAContact: koha-bugs@lists.koha-community.org The end-result problem is that clicking on cross-reference links in OPAC or staff XSLT title displays (authors, subjects) can produce incomplete results. The underlying problem is fairly complex. (Kudos to Bev Church for doing a lot of the in-depth research.) At the moment, there is only one system preference that controls authority creation -- BiblioAddsAuthorities. If you set the preference to OFF, staff cannot enter data in any authority controlled subfield. o Staff must first create an authority record and then link it to the bibliographic record if they manually create a bibliographic record. This is not a viable option for a lot of sites; they do not want to work with authority records or don't have the knowledge to create and then link a record. o Koha does no automatic bib/authority linking or authority creation if bibliographic records are imported using Z39.50 and the MARC import tool. If you set the preference to ON, staff can enter data in any authority controlled subfield. o Koha does automatic bib/authority linking and authority creation if bibliographic records are manually added or imported using Z39.50. o Koha does NO automatic bib/authority linking and authority creation if bibliographic records are added using the MARC import tool. With BiblioAddsAuthorities on, if a site does batch imports, the end result is that some authority controlled tags in their bibliographic records are linked to authority records while others are not. This affects the way Koha retrieves titles when users/staff click on the authority links in the full bibliographic record due to a searching enhancement. As it stands, the XSLT for both staff and OPAC checks for any authority record number in subfield $9 of authority controlled tags (the various author and subject fields) in the bibliographic record. If one exists, Koha uses the authority number as the search parameter instead of the name/subject string itself. For example, in an OPAC XSLT title record display, clicking on the author or one of the subjects will search against the titles linked to the authority record, not the equivalent author or subject zebra index. The search results may not be complete -- there are most probably fewer hits than if the search was done as a zebra title or subject search. See the following difference in how those cross-reference search links are formed with and without the link to the authority record: http://myserver/cgi-bin/koha/opac-search.pl?q=an:37 http://myserver/cgi-bin/koha/opac-search.pl?q=au:Carroll,%20Jonathan, http://myserver/cgi-bin/koha/opac-search.pl?q=an:38 http://myserver/cgi-bin/koha/opac-search.pl?q=su:Children%27s%20stories The most complete fix would be to modify the batch import tool to create the brief authority records, and do some substantial work on linking and merging authority records. I don't have the skill to do that, but I came up with a partial lipstick-on-a-pig solution. I created a system preference called CrossRefsUseAuthorities with this description: "If on, author and subject cross-references from title displays will use authority record to find related titles in staff and OPAC XSLT title display. If off, forces author and subject cross-reference searches to use the zebra indexes rather than the authority indexes; needed when BiblioAddsAuthorities is on but not all records have authorities (or there are multiple authority records). In that situation, a cross-reference search on the authority entry will not retrieve all titles." This tested and worked OK for OPAC XSLT, but I could not make it work for staff XSLT. The problem there seems to be that the part of C4/XSLT.pm which passes variables to the XSLT stylesheet is not being obeyed: foreach my $syspref ( qw/OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD OPACBaseURL CrossRefsUseAuthorities/ ) { Therefore, when I tried to modify the staff XSLT files similar to the change I did in the OPAC XSLT files: <xsl:choose> <xsl:when test="marc:subfield[@code=9] and $CrossRefsUseAuthorities!='0'"> <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> </xsl:otherwise> </xsl:choose> I got error messages about invalid variables from trying to use the system preference. I don't know how to fix that problem. I am attaching a patch file for the part that I do have working (the syspref and the OPAC XSLT files). Can someone test those? Any takers to (a) solve the staff XSLT problem and/or (b) solve the underlying problem of authorities not being created with imports? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5842 --- Comment #1 from Jane Wagner <jwagner@ptfs.com> 2011-03-08 16:44:59 UTC --- Created attachment 3268 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3268 patch file for OPAC XSLT and syspref fix -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5842 --- Comment #2 from Jane Wagner <jwagner@ptfs.com> 2011-03-08 16:57:45 UTC --- Per discussion on the IRC, Jared's patch on Bug 5810 would probably solve this problem as well. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5842 --- Comment #3 from Jane Wagner <jwagner@ptfs.com> 2011-03-08 18:05:06 UTC --- The revised patches on Bug 5810 solve the immediate problem -- searches can be made to use the zebra index instead of the authority record. However, the underlying problem remains: batch importing bib records does not create the brief authority records. Therefore, I'm leaving this bug report open. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5842 Jane Wagner <jwagner@ptfs.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=5810 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5842 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Depends on| |5810 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5842 Bug 5842 depends on bug 5810, which changed state. Bug 5810 Summary: Subject tracings should search complete subfields http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5810 What |Old Value |New Value ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5842 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3268|0 |1 is obsolete| | --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2012-02-12 20:22:08 UTC --- Comment on attachment 3268 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3268 patch file for OPAC XSLT and syspref fix UseAuthoritiesForTracings already provides this feature in Master and 3.6. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5842 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Marking resolved fixed as of Jared's comment#4 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org