Bug 25650: Add location and itype descriptions in ILS-DI GetRecords
Test plan: 1. Create a record with an item, and set the item's shelving location and itemtype. 2. Go to http://<OPAC>/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=<biblionumber> 3. Check that there is <itype_description> and <location_description> and that their value is correct. Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
f11659c48b
commit
08ef42582f
|
|
@ -246,6 +246,20 @@ sub GetRecords {
|
|||
$item{'homebranchname'} = $home_library ? $home_library->branchname : '';
|
||||
$item{'holdingbranchname'} = $holding_library ? $holding_library->branchname : '';
|
||||
|
||||
if ($item->location) {
|
||||
my $authorised_value = Koha::AuthorisedValues->find_by_koha_field({ kohafield => 'items.location', authorised_value => $item->location });
|
||||
if ($authorised_value) {
|
||||
$item{location_description} = $authorised_value->opac_description;
|
||||
}
|
||||
}
|
||||
|
||||
if ($item->itype) {
|
||||
my $itemtype = Koha::ItemTypes->find($item->itype);
|
||||
if ($itemtype) {
|
||||
$item{itype_description} = $itemtype->description;
|
||||
}
|
||||
}
|
||||
|
||||
my $transfer = $item->get_transfer;
|
||||
if ($transfer) {
|
||||
$item{transfer} = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue