Scenario: An item is set to auto-renew. The borrower uses Koha's web based self-check terminal to renew the item, but gets the error message "This book cannot be renewed" when he/she tries to renew the item, rather than a more specific message like "This item is set for auto-renewal". This is confusing to the borrower, who thinks that the item has not and cannot be renewed.
Created attachment 54626 [details] [review] Bug 16873: Improve renewal error messages on self check When a patron is not allowed to renew from the self check module, the only message displayed is "No renewals allowed". It would be nicer to let him/her know that the renewal is not allowed because it's a on-site checkout or automatic renewal. To do so we can call CanBookBeRenewed instead of CanBookBeIssued and get the renewal error. Test plan: 0/ Switch off AllowSelfCheckReturns 1/ check in an item and tick "auto renewal" 2/ Go on the self check module => auto renewal message is displayed 3/ check in an item and tick "on-site checkout" 4/ Go on the self check module => on-site checkout message is displayed 5/ check in an item without ticking any checkboxes (regular checkout) Renew it to reach the max renew allowed 6/ Go on the self check module => regular checkout message is displayed 7/ Switch on AllowSelfCheckReturns and repeat previous steps => "Return this item" button is displayed in addition of the renewal error message
> 1/ check in an item and tick "auto renewal" > 3/ check in an item and tick "on-site checkout" > 5/ check in an item without ticking any checkboxes (regular checkout) In these steps you mean 'check out' don't you? When I test this I see the "This is a on-site checkout" message for my on-site checkout, but for the item which is set for auto-renewal I don't see the right message. I just see "No renewals allowed." It looks like the template needs to check for 'auto_too_soon' as well as 'auto_renew'.
Created attachment 55503 [details] [review] Bug 16873: Improve renewal error messages on self check When a patron is not allowed to renew from the self check module, the only message displayed is "No renewals allowed". It would be nicer to let him/her know that the renewal is not allowed because it's a on-site checkout or automatic renewal. To do so we can call CanBookBeRenewed instead of CanBookBeIssued and get the renewal error. Test plan: 0/ Switch off AllowSelfCheckReturns 1/ check out an item and tick "auto renewal" 2/ Go on the self check module => auto renewal message is displayed 3/ check out an item and tick "on-site checkout" 4/ Go on the self check module => on-site checkout message is displayed 5/ check out an item without ticking any checkboxes (regular checkout) Renew it to reach the max renew allowed 6/ Go on the self check module => regular checkout message is displayed 7/ Switch on AllowSelfCheckReturns and repeat previous steps => "Return this item" button is displayed in addition of the renewal error message
(In reply to Owen Leonard from comment #2) > > 1/ check in an item and tick "auto renewal" > > 3/ check in an item and tick "on-site checkout" > > 5/ check in an item without ticking any checkboxes (regular checkout) > > In these steps you mean 'check out' don't you? > > When I test this I see the "This is a on-site checkout" message for my > on-site checkout, but for the item which is set for auto-renewal I don't see > the right message. I just see "No renewals allowed." > > It looks like the template needs to check for 'auto_too_soon' as well as > 'auto_renew'. Yes and Yes :) Thanks for testing!
Created attachment 56678 [details] [review] [SIGNED-OFF] Bug 16873: Improve renewal error messages on self check When a patron is not allowed to renew from the self check module, the only message displayed is "No renewals allowed". It would be nicer to let him/her know that the renewal is not allowed because it's a on-site checkout or automatic renewal. To do so we can call CanBookBeRenewed instead of CanBookBeIssued and get the renewal error. Test plan: 0/ Switch off AllowSelfCheckReturns 1/ check out an item and tick "auto renewal" 2/ Go on the self check module => auto renewal message is displayed 3/ check out an item and tick "on-site checkout" 4/ Go on the self check module => on-site checkout message is displayed 5/ check out an item without ticking any checkboxes (regular checkout) Renew it to reach the max renew allowed 6/ Go on the self check module => regular checkout message is displayed 7/ Switch on AllowSelfCheckReturns and repeat previous steps => "Return this item" button is displayed in addition of the renewal error message Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Everything works as described. I've rebased on the master.
There is a small conflict, please fix!
Created attachment 57238 [details] [review] [SIGNED-OFF] Bug 16873: Improve renewal error messages on self check When a patron is not allowed to renew from the self check module, the only message displayed is "No renewals allowed". It would be nicer to let him/her know that the renewal is not allowed because it's a on-site checkout or automatic renewal. To do so we can call CanBookBeRenewed instead of CanBookBeIssued and get the renewal error. Test plan: 0/ Switch off AllowSelfCheckReturns 1/ check out an item and tick "auto renewal" 2/ Go on the self check module => auto renewal message is displayed 3/ check out an item and tick "on-site checkout" 4/ Go on the self check module => on-site checkout message is displayed 5/ check out an item without ticking any checkboxes (regular checkout) Renew it to reach the max renew allowed 6/ Go on the self check module => regular checkout message is displayed 7/ Switch on AllowSelfCheckReturns and repeat previous steps => "Return this item" button is displayed in addition of the renewal error message Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 57670 [details] [review] [PASSED QA] Bug 16873: Improve renewal error messages on self check When a patron is not allowed to renew from the self check module, the only message displayed is "No renewals allowed". It would be nicer to let him/her know that the renewal is not allowed because it's a on-site checkout or automatic renewal. To do so we can call CanBookBeRenewed instead of CanBookBeIssued and get the renewal error. Test plan: 0/ Switch off AllowSelfCheckReturns 1/ check out an item and tick "auto renewal" 2/ Go on the self check module => auto renewal message is displayed 3/ check out an item and tick "on-site checkout" 4/ Go on the self check module => on-site checkout message is displayed 5/ check out an item without ticking any checkboxes (regular checkout) Renew it to reach the max renew allowed 6/ Go on the self check module => regular checkout message is displayed 7/ Switch on AllowSelfCheckReturns and repeat previous steps => "Return this item" button is displayed in addition of the renewal error message Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Beware: contains string changes! Could also be updated to tell if an item can no longer be auto-renewed (see Bug 15581 - Add a circ rule to not allow auto-renewals after defined loan period)
Pushed to master for 17.05, thanks Jonathan!
This patch has been pushed to 16.11.x, will be in 16.11.01!