Bug 15494

Summary: Block renewals by arbitrary item values
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: CirculationAssignee: Nick Clemens <nick>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, jdemuth, kyle.m.hall, nick
Version: master   
Hardware: All   
OS: All   
URL: http://devs.bywatersolutions.com/projects/make-longoverduelost-items-not-renewable/
Change sponsored?: Sponsored Patch complexity: Small patch
Bot Control: --- When did the bot last check this:
Who signed the patch off: Text to go in the release notes:
Attachments: Bug 15494 - Unit tests
Bug 15494 - Add _items_denied_renewal sub to C4:Circulation::CanBookBeRenewed
Bug 15494 - Update display of renewal errors
Bug 15494 - Add syspref

Description Nicole C. Engard 2016-01-06 16:27:14 UTC
This development would allow a library to prevent the renewal of items based on the values of any field in the items table including but not limited to any itemlost value.

Work to be done:
1) Add new system preference ItemsDeniedRenewal patterned after OpacHiddenItems
2) Modify C4::Circulation::CanBookBeRenewed to check this system preference

Seeking Co-sponsors: http://devs.bywatersolutions.com/projects/make-longoverduelost-items-not-renewable/
Comment 1 Nick Clemens 2017-05-24 14:46:16 UTC
Created attachment 63700 [details] [review]
Bug 15494 - Unit tests

prove t/db_dependent/Circulation.t
Comment 2 Nick Clemens 2017-05-24 14:46:19 UTC
Created attachment 63701 [details] [review]
Bug 15494 - Add _items_denied_renewal sub to C4:Circulation::CanBookBeRenewed
Comment 3 Nick Clemens 2017-05-24 14:46:22 UTC
Created attachment 63702 [details] [review]
Bug 15494 - Update display of renewal errors

To test:
1 - Define a rule to deny renewal
2 - Checkout an item meeting this rule
3 - Attempt renew an item via the OPAC
4 - Attempt renewal via SIP
5 - Attempt renewal via staff client
6 - Verify errors are reasonable
Comment 4 Nick Clemens 2017-05-24 14:46:25 UTC
Created attachment 63703 [details] [review]
Bug 15494 - Add syspref