Bugzilla – Attachment 105480 Details for
Bug 25650
Add location and itype descriptions in ILS-DI GetRecords
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25650: Add location and itype descriptions in ILS-DI GetRecords
Bug-25650-Add-location-and-itype-descriptions-in-I.patch (text/plain), 1.67 KB, created by
Julian Maurice
on 2020-06-02 07:47:03 UTC
(
hide
)
Description:
Bug 25650: Add location and itype descriptions in ILS-DI GetRecords
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2020-06-02 07:47:03 UTC
Size:
1.67 KB
patch
obsolete
>From 03f1558db45ff474ec2771a06cdc949dd4572fe8 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 2 Jun 2020 11:27:02 +0400 >Subject: [PATCH] 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. >--- > C4/ILSDI/Services.pm | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 5ebba3435d..bc5cb8676d 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -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} = { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25650
:
105480
|
107087
|
107932