Bug 27065

Summary: Automatic renewals performed when no reservable items are available but items that can be issued are available.
Product: Koha Reporter: Andreas Jonsson <andreas.jonsson>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle.m.hall
Version: 20.05   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 27065: Fix incorrect handling of return value of CanItemBeRenewed in CanBookBeRenewed

Description Andreas Jonsson 2020-11-20 11:58:32 UTC
The return value of CanItemBeReserved is incorrectly used in a condition in CanBookBeRenewed:


                    next unless CanItemBeReserved($borrowernumber,$itemnumber);

CanItemBeReserved returns a hash reference wich always evaluates to true.  The condition should instead be:

                    next unless CanItemBeReserved($borrowernumber,$itemnumber)->{status} eq 'OK';
Comment 1 Andreas Jonsson 2020-11-20 12:03:54 UTC
Created attachment 113879 [details] [review]
Bug 27065: Fix incorrect handling of return value of CanItemBeRenewed in CanBookBeRenewed
Comment 2 Jonathan Druart 2020-11-20 13:44:57 UTC
Please have a look at bug 26659.

*** This bug has been marked as a duplicate of bug 26659 ***