Bugzilla – Attachment 138976 Details for
Bug 31318
Remove GetItemsInfo from serials/routing-preview
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31318: Remove GetItemsInfo from serials/routing-preview
Bug-31318-Remove-GetItemsInfo-from-serialsrouting-.patch (text/plain), 1.99 KB, created by
Nick Clemens (kidclamp)
on 2022-08-10 11:37:23 UTC
(
hide
)
Description:
Bug 31318: Remove GetItemsInfo from serials/routing-preview
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-08-10 11:37:23 UTC
Size:
1.99 KB
patch
obsolete
>From 56a840a683c2053a1f058b25a655eea925829680 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 3 Jun 2022 08:26:41 +0200 >Subject: [PATCH] Bug 31318: Remove GetItemsInfo from serials/routing-preview > >Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered. > >Here we are going to deal with serials/routing-preview > >Test plan: >List items on the modified view and confirm that all the info is >displayed correctly > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > serials/routing-preview.pl | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl >index b33cb8dbcd..462ad307bc 100755 >--- a/serials/routing-preview.pl >+++ b/serials/routing-preview.pl >@@ -25,7 +25,6 @@ use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); > use C4::Reserves qw( AddReserve ModReserve ); > use C4::Context; >-use C4::Items qw( GetItemsInfo ); > use C4::Serials qw( delroutingmember getroutinglist GetSubscription GetSerials check_routing ); > use URI::Escape; > >@@ -62,14 +61,18 @@ my $library; > if($ok){ > # get biblio information.... > my $biblionumber = $subs->{'bibnum'}; >- my @itemresults = GetItemsInfo( $biblionumber ); >- my $branch = @itemresults ? $itemresults[0]->{'holdingbranch'} : $subs->{branchcode}; >+ >+ my $biblio = Koha::Biblios->find( $biblionumber ); >+ my $items = $biblio->items->search_ordered; >+ my $branch = >+ $items->count >+ ? $items->next->holding_branch->branchcode >+ : $subs->{branchcode}; > $library = Koha::Libraries->find($branch); > > if (C4::Context->preference('RoutingListAddReserves')){ > # get existing reserves ..... > >- my $biblio = Koha::Biblios->find( $biblionumber ); > my $holds = $biblio->current_holds; > my $count = $holds->count; > while ( my $hold = $holds->next ) { >-- >2.30.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 31318
:
138828
|
138901
| 138976