[Koha-bugs] [Bug 18450] Renew in header bypasses hold block and renewal limits

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 14 11:18:47 CET 2018


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

--- Comment #24 from sandboxes at biblibre.com <sandboxes at biblibre.com> ---
Created attachment 72836
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72836&action=edit
Bug 18450 - Followup - Implemented a conditional checking if the item that the
patron is trying to renew has more than 1 copy available which can be renewed.
This means the AllowRebnewalIfOtherItemsAvailable system preference is now
appropriately implemen

In order to make the conditional statement work correctly checking three
conditions each time (two system preferences and the value of the
can_renew variable I had to implement a elsif statement. I spent a large
amount of time trying to get a single IF statement to check the three
conditions in three different combinations but it ignored the value of
the can_renew variable each time and so I was forced to split it out
into an If and ELSIF

Test plan:
1. In More->Administration->Global system preferences
ensure that both the AllowRenewalLimitOverride and
AllowRenewalIfOtherItemsAvaliable preferences are both set to 'Dont
allow'.

2. Place a hold on an item

3. Checkout the item out to a different patron

4. Renew the item and notice the 'Cannot renew: The item is on hold for
another patron' warning

5. Click the 'Override and renew' button and notice that you
can bypass the hold

6. Apply patch

7. Try to renew an item (with item level hold on it) which belongs to a biblio
with either only one
item or a biblio with multiple items all of which have holds on them.
Notice the only button in the yellow message box displayed is
'Continue without renewing'

8. Repeat step 7 but change the hold to a 'Next available' hold rather
than an item level hold. Again notice only the 'Continue without
renewing' button is displayed

9. Try to renew an item (with item level hold on it) which belongs to a
biblio with mutliple aviable items of it in the catalogue. Notice only
the 'Continue without renewing' button is displayed

10. Repeat step 9 but change the hold to a 'Next available' hold rather
than an item level hold. Notice only the 'Continue without renewing'
button is displayed

11. Set both AllowRenewalLimitOverride and
AllowRenewalIfOtherItemsAvaliable systempreferences to 'Allow' and
repeat step 7 notice only the 'Continue without renewing' button is
displayed in the yellow message box

12. Repeat step 8 and notice only the 'Continue without renewing' button
is displayed

13. Repeat step 9 and notice only the 'Continue without renewing' button
is displayed

14. Repeat step 10 and notice the item is immediately renewed and the
yellow message box is not displayed

15. Set the AllowRenewalIfOtheritemsAvailable to 'Dont' Allow' and
repeat step 7 and notice that both the 'Override and renew' and 'Continue
without renewal' buttons are
displayed

16. Repeat step 8 and notice both buttons are displayed

17. Repeat step 9 and notice both buttons are displayed

18. Repeat step 10 and notice both buttons are displayed

19. Set AllowRenewalIfOtherItemsAvailable syspref to 'Allow' and
AllowRenewalLimitOverride syspref to 'Dont' Allow' and repeat step 7 and
notice only the 'Continue without renewal' button is displayed

20. Repeat step 8 and notice only 'Continue without renewal' button is
displayed

21. Repeat step 9 and notice only the 'Continue without renewal' button
is displayed

22. Repeat step 10 and notice both buttons are displayed

Sponsored-By: Catalyst IT

Signed-off-by: Laurence Rault <laurence.rault at biblibre.com>

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


More information about the Koha-bugs mailing list