Bugzilla – Attachment 63300 Details for
Bug 18276
Koha::Biblio - Remove GetBiblioFromItemNumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 18276: (follow-up) Remove GetBiblioFromItemNumber - ILSDI
SIGNED-OFF-Bug-18276-follow-up-Remove-GetBiblioFro.patch (text/plain), 2.29 KB, created by
Josef Moravec
on 2017-05-09 15:14:56 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 18276: (follow-up) Remove GetBiblioFromItemNumber - ILSDI
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-05-09 15:14:56 UTC
Size:
2.29 KB
patch
obsolete
>From de7d3394a6a69eae56ac0927ec55bb7ada7e193e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 5 May 2017 10:11:02 -0300 >Subject: [PATCH] [SIGNED-OFF] Bug 18276: (follow-up) Remove > GetBiblioFromItemNumber - ILSDI > >Take into account biblio level holds > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > C4/ILSDI/Services.pm | 25 ++++++++++++++----------- > 1 file changed, 14 insertions(+), 11 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 0e8663c..5076110 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -417,21 +417,24 @@ sub GetPatronInfo { > my @reserves = GetReservesFromBorrowernumber( $borrowernumber, undef ); > foreach my $reserve (@reserves) { > >+ my ( $item, $biblio, $biblioitem ) = ( {}, {}, {} ); > # Get additional informations >- my $item = Koha::Items->find( $reserve->{itemnumber} ); >- my $biblio = $item->biblio; >- my $biblioitem = $biblio->biblioitem; >- my $library = Koha::Libraries->find( $reserve->{branchcode} ); >- my $branchname = $library ? $library->branchname : ''; >- >- # Remove unwanted fields >- $item = $item->unblessed; >- delete $item->{'more_subfields_xml'}; >- $biblio = $biblio->unblessed; >- $biblioitem = $biblioitem->unblessed; >+ if ( $reserve->{itemnumber} ) { # item level holds >+ $item = Koha::Items->find( $reserve->{itemnumber} ); >+ $biblio = $item->biblio; >+ $biblioitem = $biblio->biblioitem; >+ >+ # Remove unwanted fields >+ $item = $item->unblessed; >+ delete $item->{more_subfields_xml}; >+ $biblio = $biblio->unblessed; >+ $biblioitem = $biblioitem->unblessed; >+ } > > # Add additional fields > $reserve->{'item'} = { %$item, %$biblio, %$biblioitem }; >+ my $library = Koha::Libraries->find( $reserve->{branchcode} ); >+ my $branchname = $library ? $library->branchname : ''; > $reserve->{'branchname'} = $branchname; > $reserve->{'title'} = GetBiblio( $reserve->{'biblionumber'} )->{'title'}; > } >-- >2.1.4
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 18276
:
61122
|
61123
|
61124
|
61125
|
61126
|
61177
|
61178
|
61179
|
61180
|
61181
|
62081
|
62082
|
62083
|
62084
|
62085
|
62476
|
62477
|
62478
|
62479
|
62480
|
62481
|
63121
|
63122
|
63123
|
63124
|
63125
|
63126
|
63166
|
63294
|
63295
|
63296
|
63297
|
63298
|
63299
|
63300
|
64748
|
64809
|
64810
|
64811
|
64812
|
64813
|
64814
|
64815
|
64816
|
64817
|
64878
|
64879
|
64880
|
64881
|
64882
|
64883
|
64884
|
64885
|
64886
|
64887
|
64974
|
64975