Bugzilla – Attachment 167179 Details for
Bug 36315
ILSDI GetRecord speed improvement
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36315: ILSDI GetRecords use AuthorisedValues cache for items.location
Bug-36315-ILSDI-GetRecords-use-AuthorisedValues-ca.patch (text/plain), 1.68 KB, created by
David Nind
on 2024-05-25 19:20:22 UTC
(
hide
)
Description:
Bug 36315: ILSDI GetRecords use AuthorisedValues cache for items.location
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-05-25 19:20:22 UTC
Size:
1.68 KB
patch
obsolete
>From 6bc13f9c3419445453feaa213bec32ac7692234e Mon Sep 17 00:00:00 2001 >From: Didier Gautheron <didier.gautheron@biblibre.com> >Date: Thu, 14 Mar 2024 14:51:35 +0100 >Subject: [PATCH] Bug 36315: ILSDI GetRecords use AuthorisedValues cache for > items.location > >Speedup GetRecords by using Koha cache for items.location authorised value. > >Test plan >1) Enable ILS-DI http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI >2) Download a record http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=1 >3) Note location_description >4) Apply patch >5) Re download the same record >6) Verify location_description are the same > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/ILSDI/Services.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index ee776423a9..016b2ac06e 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -254,9 +254,9 @@ sub GetRecords { > $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 }); >+ my $authorised_value = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => '', kohafield => 'items.location', authorised_value => $item->location }); > if ($authorised_value) { >- $item{location_description} = $authorised_value->opac_description; >+ $item{location_description} = $authorised_value->{opac_description}; > } > } > >-- >2.39.2
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 36315
:
164064
|
167179
|
171993