Bug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge
Summary: Add warning to patron details page if patron's fines exceed noissuescharge
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-06 13:43 UTC by Kyle M Hall
Modified: 2016-12-05 21:26 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge (2.65 KB, patch)
2015-07-06 13:47 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge (2.74 KB, patch)
2015-11-24 20:37 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 14497 [QA Followup] - Make message more easily translated (1.86 KB, patch)
2016-04-19 11:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge (3.08 KB, patch)
2016-04-19 17:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge (3.16 KB, patch)
2016-04-20 14:34 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 14497 [QA Followup] - Refactor code to have a single source for message (4.83 KB, patch)
2016-04-26 14:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge (3.22 KB, patch)
2016-04-26 18:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14497 [QA Followup] - Refactor code to have a single source for message (4.90 KB, patch)
2016-04-26 18:16 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2015-07-06 13:43:29 UTC
Some librarians have requested that the same warning on the check out page be placed on the patron details page if a patron's fines exceed the system preference noissuescharge.
Comment 1 Kyle M Hall 2015-07-06 13:47:28 UTC Comment hidden (obsolete)
Comment 2 Nick Clemens 2015-11-24 20:37:34 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens 2015-11-24 20:37:56 UTC
Internal sign off only
Comment 4 Marc Véron 2015-12-01 22:21:27 UTC
This sentence will be almost intranslatable because it is splitted by html tags:

Checkouts are BLOCKED because fine balance is OVER THE LIMIT. 

We have something similar with Bug 15274.
Comment 5 Owen Leonard 2016-03-23 12:56:28 UTC
Based on Marc's Comment 4 I think this should be "Failed QA" for now.
Comment 6 Kyle M Hall 2016-04-19 11:06:41 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2016-04-19 13:57:36 UTC
I get different messages on checkout and detail if 'AllowFineOverride' is set to 'Allow.' The detail page says checkouts are blocked, but the checkout page doesn't. The checkout page is correct in this case because the user can override the block.

Note that circulation.tt checks "[% IF ( charges_is_blocker ) %]" at line 789.
Comment 8 Kyle M Hall 2016-04-19 17:00:18 UTC Comment hidden (obsolete)
Comment 9 Kyle M Hall 2016-04-19 17:03:40 UTC
(In reply to Owen Leonard from comment #7)
> I get different messages on checkout and detail if 'AllowFineOverride' is
> set to 'Allow.' The detail page says checkouts are blocked, but the checkout
> page doesn't. The checkout page is correct in this case because the user can
> override the block.
> 
> Note that circulation.tt checks "[% IF ( charges_is_blocker ) %]" at line
> 789.

Right you are! I've made those additions and squashed all the patches together for readability.
Comment 10 Biblibre Sandboxes 2016-04-20 14:34:19 UTC
Patch tested with a sandbox, by Sally Healey <sally.healey@cheshiresharedservices.gov.uk>
Comment 11 Biblibre Sandboxes 2016-04-20 14:34:42 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2016-04-25 16:53:38 UTC
Kyle, don't you think it is worth to refactore this code (move it to an include file or something)?
Comment 13 Kyle M Hall 2016-04-26 14:30:30 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2016-04-26 18:16:35 UTC
Created attachment 50748 [details] [review]
Bug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge

Some librarians have requested that the same warning on the check out
page be placed on the patron details page if a patron's fines exceed the
system preference noissuescharge.

Test Plan:
1) Apply this patch
2) Find or create a patron who's fines exceed noissuescharge
3) Browse to that patron's details ( moremember.pl )
4) You should see a warning near the top of the page with links to the
   patron's account page and the pay fines page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Patch ammended post sign-off

Signed-off-by: Sally Healey <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Jonathan Druart 2016-04-26 18:16:39 UTC
Created attachment 50749 [details] [review]
Bug 14497 [QA Followup] - Refactor code to have a single source for message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Jonathan Druart 2016-04-26 18:18:44 UTC
The patch does what it describes, but it would be nice to have the alert better displayed (a dedicated div for instance, it would be even easier to hide it if someone does not want it).
Comment 17 Kyle M Hall 2016-04-29 12:17:46 UTC
Pushed to master for the May 2016 release!