Bug 9276 - Display of biblio-level authorized values on OPAC search results broken
Summary: Display of biblio-level authorized values on OPAC search results broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Target Milestone: ---
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 16:34 UTC by Owen Leonard
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9276 - Display of biblio-level auth vals on OPAC search broken (2.79 KB, patch)
2012-12-12 17:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 9276 - Display of biblio-level auth vals on OPAC search broken (2.80 KB, patch)
2012-12-29 09:25 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 9276 - Display of biblio-level auth vals on OPAC search broken (2.86 KB, patch)
2013-01-15 11:51 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2012-12-12 16:34:38 UTC
The switch to Template::Toolkit introduced a variable scope error in the handling of authorized value images in OPAC search results.
Comment 1 Owen Leonard 2012-12-12 17:05:29 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2012-12-29 09:25:58 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-01-15 11:51:01 UTC
QA Comment:

Works as expected. Small patch, nothing to say.

Marked as Passed QA.
Comment 4 Jonathan Druart 2013-01-15 11:51:19 UTC
Created attachment 14593 [details] [review]
Bug 9276 - Display of biblio-level auth vals on OPAC search broken

If you have your MARC framework configured to link a biblio-level
field with an authorized value, and that value is linked to an
image, and the AuthorisedValueImages system preference is turned on,
the OPAC is supposed to display that image in search results
much like item type images are displayed if item-level itemtypes
are enabled. The switch to Template::Toolkit broke this feature
with a variable scope error.

This patch corrects the variable scope of the sytem preference check
and adds a check for the existence of the image so that the template
doesn't try to display broken images.

To test:

1. Turn on the AuthorisedValueImages system preference.
2. If necessary, create or configure an authorized value with images.
3. Configure a MARC framework to link a field to the authorized value. I
   chose an arbitrary field, 942e.
4. Edit a bibliographic record and set a value for the MARC field
   you configured.
5. Make sure Zebra has reindexed, and perform an OPAC search which
   will include the record you edited. With AuthorisedValueImages
   ON, you should see the correct authorized value image.
6. With AuthorisedValueImages OFF, you should see no image.
7. Turn AuthorisedValueImages back on. Edit the authorized value again
   and configure it with no image. Perform your search again. You should
   see no image.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Jared Camins-Esakov 2013-01-18 03:10:31 UTC
This patch has been pushed to master.
Comment 6 Chris Cormack 2013-02-01 08:09:47 UTC
Pushed to 3.10.x and 3.8.x will be in 3.10.3 and 3.8.10