Bug 10446

Summary: System preference maxoutstanding is poorly named
Product: Koha Reporter: Kyle M Hall <kyle.m.hall>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall <kyle.m.hall>
Status: Failed QA --- QA Contact:
Severity: trivial    
Priority: P5 - low CC: jonathan.druart, katrin.fischer, kyle, mtompset, srdjan
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 10445    
Attachments: Bug 10446 - System preference maxoutstanding is poorly named
[SIGNED-OFF] Bug 10446 - System preference maxoutstanding is poorly named
[SIGNED-OFF] Bug 10446 - System preference maxoutstanding is poorly named
Bug 10446 - Follow up fix
Bug 10446 - System preference maxoutstanding is poorly named
Bug 10446 - Follow up fix
Bug 10446 - System preference maxoutstanding is poorly named
Bug 10446 - Follow up fix

Description Kyle M Hall 2013-06-11 14:11:15 UTC
The system preference 'maxoutstanding' is defined as the maximum amount of fees owed by the patron before Koha should block placing holds, but the name does not describe its behavior very well.
Comment 1 Kyle M Hall 2013-06-11 14:21:20 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2013-07-24 04:11:55 UTC
Got
fatal: sha1 information is lacking or useless (C4/SIP/ILS/Patron.pm).
Repository lacks necessary blobs to fall back on 3-way merge.
when applying
Comment 3 Srdjan Jankovic 2013-07-24 04:46:41 UTC Comment hidden (obsolete)
Comment 4 Srdjan Jankovic 2013-07-24 04:48:18 UTC
I'm ashamed to admit that I do not know how .po files get generated, so I assume nothing needs to be done there.
Comment 5 Katrin Fischer 2013-07-24 05:14:57 UTC
Hi Srdjan, po files are generated by running the translate script in misc/translator. For system preferences nothing much has to be done - you just have to make sure description in the .pref file makes sense. The scripts will make the file translatable :)
Comment 6 Jonathan Druart 2013-08-26 14:38:06 UTC
Kyle, 
the patch does not apply anymore against master:
  fatal: sha1 information is lacking or useless (C4/SIP/ILS/Patron.pm).
  Repository lacks necessary blobs to fall back on 3-way merge.
  Cannot fall back to three-way merge.

Maybe it is caused by the sysprefs.sql file.

Could you try to rebase it please?
Comment 7 Jonathan Druart 2013-08-26 14:39:05 UTC
Oops, I missed the dependency!
Comment 8 Jonathan Druart 2013-08-26 14:53:16 UTC
Since this patch is easy to test, maybe it would be better to change the dependency. Making bug 10445 depends on this one will allow to pass qa it.
Comment 9 Jonathan Druart 2013-09-13 15:00:19 UTC
CONFLICT (content): Merge conflict in C4/SIP/ILS/Patron.pm
Comment 10 Srdjan Jankovic 2014-03-26 23:32:35 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2014-03-27 10:08:04 UTC
  git grep maxoutstanding
returns
circ/offline.pl:$template->{'VARS'}->{'maxoutstanding'} =
circ/offline.pl:  C4::Context->preference('maxoutstanding') || 0;
koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt:        if (parseInt(patron.fine) > [% maxoutstanding %]) {

They should be fixed too.
Comment 12 Mark Tompsett 2014-07-28 22:10:24 UTC Comment hidden (obsolete)
Comment 13 Mark Tompsett 2014-07-29 02:44:52 UTC Comment hidden (obsolete)
Comment 14 Mark Tompsett 2014-07-29 02:45:10 UTC Comment hidden (obsolete)
Comment 15 Mark Tompsett 2014-07-29 02:56:30 UTC
Sorry for an incomplete test plan, but I'm not sure how to use the offline circulation. But it should be similar to steps 2-6 elsewhere.
Comment 16 Mark Tompsett 2014-10-26 04:41:00 UTC
Created attachment 32757 [details] [review]
Bug 10446 - System preference maxoutstanding is poorly named

The system preference 'maxoutstanding' is defined as the maximum amount
of fees owed by the patron before Koha should block placing holds, but
the name does not describe its behavior very well.

String changes only, no functional changes made.

Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Verify the new system preference FeesBlockHoldsAmount's value matches
   the previous value of maxoutstanding.
4) Set FeesBlockHoldsAmount to $10
5) Attempt to place an OPAC hold for a patron owing less than $10
   This attempt should succeed.
6) Attempt to place an OPAC hold for a patron owing more than $10
   This attempt should fail

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Comment 17 Mark Tompsett 2014-10-26 04:41:12 UTC
Created attachment 32758 [details] [review]
Bug 10446 - Follow up fix

As per comment #11 by Jonathan Druart, I just fixed the items
in question. Plus, I noted a typographical error in the
updatedatabase.pl message (10466 vs. 10446)

TEST PLAN
---------
1) Apply the patch
2) Ensure the Circulation system preference, AllowOfflineCirculation,
    is enabled.
3) Home -> Circulation -> Built-in offline circulation interface
Comment 18 Mark Tompsett 2014-10-26 04:45:14 UTC
Rebased, but I'm still lacking a complete test plan, so I'll leave it as Failed QA.