[Koha-bugs] [Bug 30556] OPAC shows "Place hold" button on available items even if on shelf holds aren't allowed
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Oct 3 00:37:47 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30556
Katrin Fischer <katrin.fischer at bsz-bw.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Signed Off |Failed QA
--- Comment #29 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
In your code I see:
+my $currentbranch = C4::Context->userenv ? C4::Context->userenv->{branch} :
undef;
+ $is_available = IsAvailableForItemLevelRequest($item, $patron,
$currentbranch)
+ unless $is_available;
But when I look at the POD for IsAvailableForItemLevelRequest the third
parameter is supposed to be the pick-up location, not the logged-in user's
branch:
https://git.koha-community.org/Koha-community/Koha/src/commit/9408a443c24a5424828f62b48fa1dda04fdf3512/C4/Reserves.pm#L1323
my $is_available = IsAvailableForItemLevelRequest( $item_record,
$borrower_record, $pickup_branchcode );
I believe this isn't correct. A system might allow you to place a hold for
pickup at the item's home library, which might not be the patron's home
library.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list