Bug 18276: Remove GetBiblioFromItemNumber - ILSDI
Test plan: Hit /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=51&show_holds=1 The results should be the same before and after this patch Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
dadfeabc37
commit
b2e305b10b
1 changed files with 7 additions and 2 deletions
|
@ -423,15 +423,20 @@ sub GetPatronInfo {
|
|||
|
||||
my $unblessed_hold = $hold->unblessed;
|
||||
# Get additional informations
|
||||
my $item = GetBiblioFromItemNumber( $hold->itemnumber, undef );
|
||||
my $item = Koha::Items->find( $hold->itemnumber );
|
||||
my $biblio = $item->biblio;
|
||||
my $biblioitem = $biblio->biblioitem;
|
||||
my $library = Koha::Libraries->find( $hold->branchcode ); # Should $hold->get_library
|
||||
my $branchname = $library ? $library->branchname : '';
|
||||
|
||||
# Remove unwanted fields
|
||||
$item = $item->unblessed;
|
||||
delete $item->{'more_subfields_xml'};
|
||||
$biblio = $biblio->unblessed;
|
||||
$biblioitem = $biblioitem->unblessed;
|
||||
|
||||
# Add additional fields
|
||||
$unblessed_hold->{item} = $item;
|
||||
$unblessed_hold->{item} = { %$item, %$biblio, %$biblioitem };
|
||||
$unblessed_hold->{branchname} = $branchname;
|
||||
$unblessed_hold->{title} = GetBiblio( $hold->biblionumber )->{'title'}; # Should be $hold->get_biblio
|
||||
|
||||
|
|
Loading…
Reference in a new issue