Bug 10006 - holding branch is not available to XSLT display
authorLiz Rea <liz@catalyst.net.nz>
Tue, 9 Apr 2013 01:20:09 +0000 (13:20 +1200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 26 Apr 2013 02:14:23 +0000 (22:14 -0400)
To test:

Use attached XSLT stylesheet for OPAC Results
 * set your OPACXSLTResultsDisplay to use the attached stylesheet. The path is the FULL PATH, from /, to the file.
 * be sure to copy MARC21slimUtils.xsl to the same folder, or change the path in the attached one to point to the correct path on your filesystem.

Verify that the OPAC results now show the holding branch instead of the home branch.

Possible fail states:

* no branch is shown (only call numbers, if given)
* the wrong branch is shown

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

C4/XSLT.pm

index dd1967a..19ce2ab 100644 (file)
@@ -280,10 +280,12 @@ sub buildKohaItemsNamespace {
             $status = "available";
         }
         my $homebranch = $item->{homebranch}? xml_escape($branches->{$item->{homebranch}}->{'branchname'}):'';
+        my $holdingbranch = $item->{holdingbranch}? xml_escape($branches->{$item->{holdingbranch}}->{'branchname'}):'';
         $location = $item->{location}? xml_escape($shelflocations->{$item->{location}}):'';
         $ccode = $item->{ccode}? xml_escape($ccodes->{$item->{ccode}}):'';
         my $itemcallnumber = xml_escape($item->{itemcallnumber});
         $xml.= "<item><homebranch>$homebranch</homebranch>".
+                "<holdingbranch>$holdingbranch</holdingbranch>".
                 "<location>$location</location>".
                 "<ccode>$ccode</ccode>".
                "<status>$status</status>".