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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 28 15:16:26 CEST 2023


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

--- Comment #22 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 156326
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156326&action=edit
Bug 34886: [alternate] Adjust holdability checks on opac details page

This patch tries to simplify some of the logic here to match that on the search
results. When we don't have a patron, we fallback to determining if an item can
be held buy determining whether there are any items that don't have holds
disallowed at the all libraries level. We also remove items with non-holdable
statuses like withdrawn etc (and check some system preferences)

If we don't have a patron, then we are done, however, if we do, then we need to
check each item against the policies related to that patron.

This patch also removes two checks at the end:
CountItemsIssued($biblionumber)
$biblio->has_items_waiting_or_intransit

These seem to be from bug 4319 - however, those rules are checked by
IsAvailableForItemLevelRequest and are only relevant when we have a patron.
These checks essentially assumed 'onshelfholds' policy of 'If any unavailable'
For consistency sake I think we should follow the same logic as the results
page.

To test:
1 - Find a record with two items, of different types, set a 'Default checkout,
hold and return policy' of 'No holds allowed'
2 - Search opac, not logged in, and verify neither the results page or details
page shows the place hold button
3 - Delete that rule, make both items withdrawn
4 - Search opac, not logged in, and verify neither the results page or details
page shows the place hold button
5 - Mark one item as not withdrawn
6 - Search opac, not logged in, and verify both the results page or details
page shows the place hold button
7 - Log in to opac
8 - Search opac, logged in, and verify both the results page or details page
shows the place hold button
9 - Place an 'On shelf holds policy' rule for that patron category of 'If any
unavailable'
10 - Search opac, logged in, and verify the results and details page shows the
place hold button
11 - Set the other item to not withdrawn
12 - Search opac, logged in, and verify the results page shows the place hold
button, but details does not
13 - Try various other scenarios - details page should be more correct, results
page is always an approximation

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


More information about the Koha-bugs mailing list