From 10fe2d58dd2e861c68e732b88c082429e321fc23 Mon Sep 17 00:00:00 2001 From: kohamaster Date: Wed, 12 Oct 2016 16:17:04 +0200 Subject: [PATCH] Bug 17435: Gives ability to display stocknumber in search results MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Adds stocknumber to data provided for xslt transformation Test plan : 1) go to Administration module, MARC default frameworks and add, if not already done, a stocknumber subfield (a priori under the 995 tag). It will be linked to items.stocknumber in the koha.link zone of Advanced constraints section. 2) edit an item in staff interface and add a number in the stocknumber field. 3) Edit the xslt opac Results file that you are using and customize it. For a basic test, you can just replace "itemcallnumber" occurrences by "stocknumber". 4) make a search in a way to get several results including the title from which you modified an item. 5) You will see the added stocknumber displayed (between square brackets in the default xslt). Same can be done through staff interface and staff xslt files. Olivier Crouzet Signed-off-by: Hector Castro Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall (cherry picked from commit f74e467550c4d6f6e8e9becdc61b7df572de5f09) Signed-off-by: Frédéric Demians --- C4/XSLT.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 19f643a77f..5077d49131 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -311,6 +311,7 @@ sub buildKohaItemsNamespace { $location = $item->{location}? xml_escape($shelflocations->{$item->{location}}||$item->{location}):''; $ccode = $item->{ccode}? xml_escape($ccodes->{$item->{ccode}}||$item->{ccode}):''; my $itemcallnumber = xml_escape($item->{itemcallnumber}); + my $stocknumber = $item->{stocknumber}? xml_escape($item->{stocknumber}):''; $xml .= "" . "$homebranch" @@ -319,6 +320,7 @@ sub buildKohaItemsNamespace { . "$ccode" . "$status" . "$itemcallnumber" + . "$stocknumber" . ""; } $xml = "".$xml.""; -- 2.39.5