Bugzilla – Attachment 129262 Details for
Bug 29562
Pass objects to CanItemBeReserved and checkHighHolds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29562: (follow-up) Fix API controller
Bug-29562-follow-up-Fix-API-controller.patch (text/plain), 1.88 KB, created by
Jonathan Druart
on 2022-01-10 13:20:43 UTC
(
hide
)
Description:
Bug 29562: (follow-up) Fix API controller
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-01-10 13:20:43 UTC
Size:
1.88 KB
patch
obsolete
>From c91144cf12fbd24b40e36976fdc103c9fc556792 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 10 Jan 2022 08:01:20 -0300 >Subject: [PATCH] Bug 29562: (follow-up) Fix API controller > >This patch fixes tests failures due to bad checks in the controller. >The tests deserve to be rewritten. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Reserves.pm | 2 +- > Koha/REST/V1/Holds.pm | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 3a49f7cc1b9..0b79951cedb 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -388,7 +388,7 @@ sub CanItemBeReserved { > > # we retrieve borrowers and items informations # > # item->{itype} will come for biblioitems if necessery >- my $biblio = $item->biblio; >+ my $biblio = $item->biblio; > my $borrower = $patron->unblessed; > > # If an item is damaged and we don't allow holds on damaged items, we can stop right here >diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm >index c4a942caca3..8012da97845 100644 >--- a/Koha/REST/V1/Holds.pm >+++ b/Koha/REST/V1/Holds.pm >@@ -165,7 +165,7 @@ sub add { > ) unless $valid_pickup_location || $can_override; > > my $can_place_hold >- = $item_id >+ = $item > ? C4::Reserves::CanItemBeReserved( $patron, $item ) > : C4::Reserves::CanBookBeReserved( $patron_id, $biblio_id ); > >@@ -192,7 +192,7 @@ sub add { > { > branchcode => $pickup_library_id, > borrowernumber => $patron_id, >- biblionumber => $biblio_id, >+ biblionumber => $biblio->id, > priority => $priority, > reservation_date => $hold_date, > expiration_date => $expiration_date, >-- >2.25.1
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 29562
:
127966
|
129245
|
129246
|
129252
|
129253
|
129254
|
129255
|
129257
|
129261
|
129262
|
129263
|
129264
|
129926
|
129927
|
129928
|
129929
|
130033