Summary: | opac-reserve does not correctly warn of too_much reserves | ||
---|---|---|---|
Product: | Koha | Reporter: | David Bourgault <david.bourgault> |
Component: | Hold requests | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | bwsdonna, fridolin.somers, gmcharlt, jonathan.druart, katrin.fischer, lucas, nick, tomascohen, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16787 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.11.00,22.05.06,21.11.12
|
|
Attachments: |
Bug 19540: Tell the patron why a hold cannot be placed on items
Bug 19540: Tell the patron why a hold cannot be placed on items Bug 19540: Tell the patron why a hold cannot be placed on items |
Description
David Bourgault
2017-10-27 15:10:59 UTC
I think the problem affects all holds that are blocked by CanBookBeReserved() error codes. They are never handled/transmitted to the user. *** Bug 11160 has been marked as a duplicate of this bug. *** Still an issue. *** Bug 27335 has been marked as a duplicate of this bug. *** Created attachment 114919 [details] [review] Bug 19540: Tell the patron why a hold cannot be placed on items This patch adds an explanation when a hold cannot be placed, in some situation: tooManyReserves tooManyHoldsForThisRecord tooManyReservesToday itemAlreadyOnHold Would this patch work? Jonathan, For me this patch works. I followed a test plan like so: 1 Set an issuing rule's 'Holds allowed (total)'' to a low number (1 or 2); 2 Place more holds than you are allowed and note the error: 'There are no items that can be placed on hold.' 3. Set the issuing rule 'Holds allowed (total)' to 3 or 4 and set the issuing rule 'Holds allowed (daily)' to 1. Note the error 'There are no items that can be placed on hold.' 4. Set the issuning rule 'Holds per record (count)' to 1 then set 'Holds allowed (total)' and 'Holds allowed (daily)' to a high number. 6. Set the issuing rule 'OPAC item level holds' to allow. 7. Find an record with multiple items attached. Place a hold on 2 of the items in the record. Note the error 'There are no items that can be placed on hold.' 8. Make sure issuing rule 'OPAC item level holds' to allow and place an item level hold. 9. Try to place a 2nd hold on that same record. Note the error: 'There are no items that can be placed on hold.' Apply patch repeat step 1: error message should read: 'This title cannot be requested because you reached the maximum number of holds.' repeat step 3: error message should now read: 'his title cannot be requested because you reached the daily hold limit'. repeat step 6 and 7: error message should no read 'This title cannot be requested because you exceeded max holds per record.' repeat steps 8 and 9: error message should read: 'This title cannot be requested because you already have hold for this item.' It looks like we kinda forgot about this one :( Is there a chance to revive? Did you test the patch? Created attachment 134755 [details] [review] Bug 19540: Tell the patron why a hold cannot be placed on items This patch adds an explanation when a hold cannot be placed, in some situation: tooManyReserves tooManyHoldsForThisRecord tooManyReservesToday itemAlreadyOnHold Signed-off-by: Owen Leonard <oleonard@myacpl.org> I like it, but it feels like several more use cases need to be considered. Things like: - pickupNotInHoldGroup - libraryNotPickupLocation - branchNotInHoldGroup look like they should share the description, more or less. (In reply to Tomás Cohen Arazi from comment #11) > I like it, but it feels like several more use cases need to be considered. > > Things like: > - pickupNotInHoldGroup > - libraryNotPickupLocation > - branchNotInHoldGroup > > look like they should share the description, more or less. The patch fixes the problem that is described in comment 0. Can this bug be on #c0 and a new bug report created for other cases ? Many public libraries are asking for this. Created attachment 139286 [details] [review] Bug 19540: Tell the patron why a hold cannot be placed on items This patch adds an explanation when a hold cannot be placed, in some situation: tooManyReserves tooManyHoldsForThisRecord tooManyReservesToday itemAlreadyOnHold Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for 22.05.06 Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. Thanks! Pushed to 21.11 for 21.11.12 |