Created attachment 52773 [details] example of error Steps to recreate: - for a particular item type & patron category, configure a non-zero "no renewal before" date i.e. make it so items cannot be immediately renewed - sign in as a patron in aforementioned patron category - check out an item of aforementioned item type - go to your renewals page in OPAC /cgi-bin/koha/opac-user.pl Actual results: - note that under the "Renew" column a message prints indicating you cannot renew, due to lines 244-249 of /koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt - https://github.com/Koha-Community/Koha/blob/87dbed0abd67e88ae85f633d9f4c63c38a2f7e24/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt#L244-L249 - however, the logic above on lines 77-85 doesn't match, the "too_soon" error isn't being tested for - https://github.com/Koha-Community/Koha/blob/87dbed0abd67e88ae85f633d9f4c63c38a2f7e24/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt#L77-L85 The end result is undesirable: because the error loop triggers, the patron sees a message, but *there's no reason given*! See attached screenshot. Expected results: - a message prints indicating the reason why you cannot renew the item I'll add a patch to opac-user.tt for this shortly.
Created attachment 52774 [details] [review] patch for opac-user.tt
Created attachment 54085 [details] [review] Bug 16806: no error message for 'too_soon' renewal To test: - for a particular item type & patron category, configure a non-zero "no renewal before" date so items can't be immediately renewed - sign in as a patron in aforementioned patron category - check out an item of aforementioned item type - go to your renewals page in OPAC /cgi-bin/koha/opac-user.pl - an error messages appears in the div.alert.dialog up top Sponsored-by: California College of the Arts Signed-off-by: Brendon Ford <brendon.ford@manhattan.edu>
Created attachment 54087 [details] [review] Bug 16806: no error message for 'too_soon' renewal To test: - for a particular item type & patron category, configure a non-zero "no renewal before" date so items can't be immediately renewed - sign in as a patron in aforementioned patron category - check out an item of aforementioned item type - go to your renewals page in OPAC /cgi-bin/koha/opac-user.pl - an error messages appears in the div.alert.dialog up top Sponsored-by: California College of the Arts Signed-off-by: Brendon Ford <brendon.ford@manhattan.edu> Signed-off-by: Irma Birchall <irma@calyx.net.au>
Created attachment 54116 [details] [review] [PASSED QA] Bug 16806: no error message for 'too_soon' renewal To test: - for a particular item type & patron category, configure a non-zero "no renewal before" date so items can't be immediately renewed - sign in as a patron in aforementioned patron category - check out an item of aforementioned item type - go to your renewals page in OPAC /cgi-bin/koha/opac-user.pl - an error messages appears in the div.alert.dialog up top Sponsored-by: California College of the Arts Signed-off-by: Brendon Ford <brendon.ford@manhattan.edu> Signed-off-by: Irma Birchall <irma@calyx.net.au> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Thx Eric, Brendon and Irma!
Pushed to master for 16.11, thanks Eric!
Pushed in 16.05. Will be in 16.05.03.
Pushed to 3.22.x, will be in 3.22.10