Bug 29169

Summary: Wrong "daily limit" warning when article request is not available
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: OPACAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: m.de.rooy, nick, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on: 27945    
Bug Blocks:    
Attachments: Bug 29169: Fix wrong terminology when article request is not available
Bug 29169: Fix wrong terminology when article request is not available

Description Jonathan Druart 2021-10-05 09:19:13 UTC
If you have reached the daily limit (bug 27945) and article request are not possible, the error will be "daily limit reached" when it should be "No article requests can be made for this record"

Step to recreate:
- Turn the syspref "ArticleRequests" on
- Circ rule "Article requests" => No
- "Default article requests limits" for your patron's category => 0

/cgi-bin/koha/opac-request-article.pl?biblionumber=1

=> "You reached your article requests daily limit."

The ELSIF ELSE in opac-request-article.tt need to be improved.
Comment 1 Tomás Cohen Arazi 2021-10-07 15:03:06 UTC
Created attachment 125893 [details] [review]
Bug 29169: Fix wrong terminology when article request is not available

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Marcel de Rooy 2021-10-08 06:03:30 UTC
+                        [% SWITCH error_message %]
+                            [% CASE 'article_request_limit_reached'       %]You reached your open article requests limit.
+                            [% CASE 'article_request_unhandled_exception' %]An error has occurred.
+                        [% END %]

No blocker, but there is no fallback.
Comment 3 Marcel de Rooy 2021-10-08 06:05:22 UTC
(In reply to Marcel de Rooy from comment #2)
> +                        [% SWITCH error_message %]
> +                            [% CASE 'article_request_limit_reached'      
> %]You reached your open article requests limit.
> +                            [% CASE 'article_request_unhandled_exception'
> %]An error has occurred.
> +                        [% END %]
> 
> No blocker, but there is no fallback.

Which there wasnt either ;)
Comment 4 Marcel de Rooy 2021-10-08 06:06:30 UTC
Created attachment 125919 [details] [review]
Bug 29169: Fix wrong terminology when article request is not available

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2021-10-08 06:07:02 UTC
Trivial edit. SO + QA combined
Comment 6 Jonathan Druart 2021-10-08 15:01:28 UTC
Pushed to master for 21.11, thanks to everybody involved!