Bug 16806 - "Too soon" renewal error generates no alert for user
Summary: "Too soon" renewal error generates no alert for user
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 16.05
Hardware: All All
: P5 - low minor (vote)
Assignee: Eric Phetteplace
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-23 23:01 UTC by Eric Phetteplace
Modified: 2017-12-07 22:17 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:


Attachments
example of error (50.92 KB, image/png)
2016-06-23 23:01 UTC, Eric Phetteplace
Details
patch for opac-user.tt (1.66 KB, patch)
2016-06-23 23:14 UTC, Eric Phetteplace
Details | Diff | Splinter Review
Bug 16806: no error message for 'too_soon' renewal (1.79 KB, patch)
2016-08-06 22:46 UTC, Brendon Ford
Details | Diff | Splinter Review
Bug 16806: no error message for 'too_soon' renewal (1.84 KB, patch)
2016-08-06 23:13 UTC, Irma Birchall
Details | Diff | Splinter Review
[PASSED QA] Bug 16806: no error message for 'too_soon' renewal (1.91 KB, patch)
2016-08-07 11:24 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Phetteplace 2016-06-23 23:01:12 UTC
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.
Comment 1 Eric Phetteplace 2016-06-23 23:14:40 UTC Comment hidden (obsolete)
Comment 2 Brendon Ford 2016-08-06 22:46:45 UTC Comment hidden (obsolete)
Comment 3 Irma Birchall 2016-08-06 23:13:25 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2016-08-07 11:24:14 UTC
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>
Comment 5 Katrin Fischer 2016-08-07 11:24:54 UTC
Thx Eric, Brendon and Irma!
Comment 6 Kyle M Hall 2016-08-10 13:52:55 UTC
Pushed to master for 16.11, thanks Eric!
Comment 7 Frédéric Demians 2016-08-23 09:45:56 UTC
Pushed in 16.05. Will be in 16.05.03.
Comment 8 Julian Maurice 2016-08-23 15:43:33 UTC
Pushed to 3.22.x, will be in 3.22.10