Bugzilla – Attachment 91915 Details for
Bug 23414
Improve performance of C4/XSLT/buildKohaItemsNamespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23414: Prefetch reserves and use them for determining waiting
Bug-23414-Prefetch-reserves-and-use-them-for-deter.patch (text/plain), 1.71 KB, created by
Nick Clemens (kidclamp)
on 2019-08-01 18:37:50 UTC
(
hide
)
Description:
Bug 23414: Prefetch reserves and use them for determining waiting
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-08-01 18:37:50 UTC
Size:
1.71 KB
patch
obsolete
>From 5975729c2712611a536d71a7580ff94d49e6bea4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 1 Aug 2019 18:13:54 +0000 >Subject: [PATCH] Bug 23414: Prefetch reserves and use them for determining > waiting > >This dependss on bug 23413 > >Same tests as before, you shouldn't see a hit with this change >--- > C4/XSLT.pm | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 0a35eb349e..53c670f6e4 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -295,7 +295,7 @@ sub buildKohaItemsNamespace { > my $search_params; > $search_params->{'me.biblionumber'} = $biblionumber; > $search_params->{'me.itemnumber'} = { not_in => $hidden_items } if $hidden_items; >- my @items = Koha::Items->search($search_params,{prefetch=>'branchtransfers'}); >+ my @items = Koha::Items->search($search_params,{prefetch=>['branchtransfers','reserves']}); > > my $shelflocations = > { map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => "", kohafield => 'items.location' } ) }; >@@ -311,8 +311,6 @@ sub buildKohaItemsNamespace { > for my $item (@items) { > my $status; > >- my $reservestatus = C4::Reserves::GetReserveStatus( $item->itemnumber ); >- > if ( $item->notforloan < 0) { > $status = "On order"; > } >@@ -334,7 +332,7 @@ sub buildKohaItemsNamespace { > elsif ($item->get_transfer) { > $status = 'In transit'; > } >- elsif (defined $reservestatus && $reservestatus eq "Waiting") { >+ elsif ( $item->holds({found =>'W'}) ) { > $status = 'Waiting'; > } > elsif ($item->has_pending_hold) { >-- >2.11.0
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 23414
:
91913
|
91914
|
91915
|
94537
|
94580
|
94581
|
95010
|
95011
|
95012
|
95014
|
95015
|
95069
|
95070
|
95071
|
95072
|
95073
|
95083
|
95084
|
95085
|
95086
|
95087
|
95088
|
95089