[Koha-bugs] [Bug 34886] Regression in when hold button appears

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Sep 27 12:20:56 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34886

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #156153|0                           |1
        is obsolete|                            |

--- Comment #15 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 156279
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156279&action=edit
Bug 34886: Move patron check onto C4/Reserves.pm

Rollback changes in opac-detail.pl

Run tests:
prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
prove t/db_dependent/Reserves.t

Bug 15534 changed onshelfholds going from 0/1 circ rule to 0/1/2
But the check in opac-detail.pl still remained checking for just a positive
value.
Currently, onshelfholds is as follows:
1 - Yes
0 - If any unavailable
2 - If all unavailable

I think the check needs to be updated to only when onshelfholds = 1 (Yes),
which is effectively done in IsAvailableForItemLevelRequest in C4/Reserves.pm,
with the caveat that when onshelfholds = 2, it requires the $patron to exist to
do the full check.

This patch fixes the issue. But also makes it so that the "Place hold" link
only shows for the unauthenticated user if onshelfholds = "Yes", whereas before
it showed for the unauthenticated user if onshelfholds = "Yes" OR if
onshelfholds = "If all unavailable"

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list