Bug 11633 - Cannot use the override function AllowFineOverride on the Staff client because this stops the pay function working on the SelfCheck (SC) machines
Summary: Cannot use the override function AllowFineOverride on the Staff client becaus...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Colin Campbell
QA Contact: Brendan Gallagher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-29 11:47 UTC by Jonathan Field
Modified: 2015-06-04 23:33 UTC (History)
6 users (show)

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


Attachments
Patch fixing incorrect behaviour on issue (1.50 KB, patch)
2014-04-17 15:29 UTC, Colin Campbell
Details | Diff | Splinter Review
Second patch ensuring Patron Info is returned correctly (3.21 KB, patch)
2014-04-17 15:43 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 11633 : Block Issue if fines require staff override (1.55 KB, patch)
2014-08-12 08:16 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 11633 Return Correct status if patron blocked by fines (3.25 KB, patch)
2014-08-12 08:16 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 11633 : Block Issue if fines require staff override (1.63 KB, patch)
2014-08-22 14:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 11633 Return Correct status if patron blocked by fines (3.33 KB, patch)
2014-08-22 14:59 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Field 2014-01-29 11:47:16 UTC
You cannot use the override function (AllowFineOverride) on “Fines outstanding” on the Staff client because this stops the pay function working on the SelfCheck (SC) machines.
 
The SIP2 devices share this system preference. 

Test Plan
=========
1) Set System Preference AllowFineOverride to "Allow".
2) On SIP2 device (e.g. 3M SelfCheck) try paying a fine. We see:-
Borrower XXXXXXXXX had existing fines of 50p (2 x 25p). Attempted to borrow book YYYYYYYYYYYYY. Chose 'Pay Fines Later' and issue was allowed even with an outstanding (payable) fine. Tried to pay fines SelfCheck Machine asked for correct amount took money but then returned money stating it could not charge account and to enquire at desk.

In the SIP2 response, character position 1 & 2 on the 64 response need to be set to Y for the SIP2 device to properly handle the block. 

64YY        Y   00020110614 .................

In Koha these are only set in two scenarios
1) If the user has expired and 
2) if the user is debarred

Needs a change in the Members logic the status in the ILS::Patron is
setup on the basis of the return from GetMemberDetails it does not set
the noissues flag if staff can override (AllowFineOverride option). In
the staff client the noissuescharge is applied as part of the checkout
transaction in 'CanBookBeIssued'.
Comment 1 Colin Campbell 2014-04-17 13:14:16 UTC
Clarify the behaviour with AllowFineOverride set to 'dont allow' Behaviour is:

Request:6300120140417    135829          AOCPL|AA23529001223654|ACsipuser|ADSIPK1|AY1AZECE8
Response:64YYYY      YY  00120140417    135829000000000001000000000000AOCPL|AA23529001223654|AEMadeleine Smith|BLY|CQN|BV19.00|CC5|BDEdinburgh 1111111|PCPT|PIN|AFGreetings from Koha.  -- Patron owes 19.00|AY1AZC8BA[0d][0a]
Request:11YN20140417    13582920141211    235500AOCPL|AA23529001223654|AB502326000745|ACsipuserAY2AZEA61
Response:120NUN20140417    135829AOCPL|AA23529001223654|AB502326000745|AJThe hydrogen sonata /|AH|AFPatron Blocked|BLY|AY2AZDF60[0d][0a]

Status response (64) returns that Patron is blocked from borrowing. An attempt to borrow (Request 11) is rejected

With 'AllowFineOverride' behaviour is

Request:6300120140417    140210          AOCPL|AA23529001223654|ACsipuser|ADSIPK1|AY1AZECFC
Response:64          YY  00120140417    140210000000000001000000000000AOCPL|AA23529001223654|AEMadeleine Smith|BLY|CQN|BV19.00|CC5|BDEdinburgh 1111111|PCPT|PIY|AFGreetings from Koha.  -- Patron owes 19.00|AY1AZC9A7[0d][0a]
Request:11YN20140417    14021020141211    235500AOCPL|AA23529001223654|AB502326000745|ACsipuserAY2AZEA75
Response:121NNY20140417    140210AOCPL|AA23529001223654|AB502326000745|AJThe hydrogen sonata /|AH20140419    235900|AY2AZE3D5[0d][0a]

Response now indicates borrower is not blocked from borrowing and indeed a request to issue the item succeeds. 

This subverts the normal behaviour as the borrower is still stopped in the online and requires staff permission to borrow. If that permission is refused the borrower can now still borrow the item if there is a self check unit available
Comment 2 Colin Campbell 2014-04-17 15:29:13 UTC Comment hidden (obsolete)
Comment 3 Colin Campbell 2014-04-17 15:43:45 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2014-08-12 08:16:37 UTC Comment hidden (obsolete)
Comment 5 Chris Cormack 2014-08-12 08:16:56 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2014-08-22 10:48:37 UTC
I am not able to test SIP, so I cannot test this patch.
But looking at the code, it smells good to me.
Comment 7 Kyle M Hall 2014-08-22 14:59:29 UTC
Created attachment 31099 [details] [review]
[PASSED QA] Bug 11633 : Block Issue if fines require staff override

If a patrons fines exceed noissuescharge and we allow
staff to allow issue at their discretion via an override
the SIP process allowed charges to go ahead.
This patch closes the loophole which allowed self issue
to subvert the usual library loan policy

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall 2014-08-22 14:59:48 UTC
Created attachment 31100 [details] [review]
[PASSED QA] Bug 11633 Return Correct status if patron blocked by fines

If the patron has amassed charges that block borrowing, but we
allow staff override the information that the patron cannot
issue should be included the patron information response

This patch sets the appropriate status fields in the patron object

It restores the fee_limit member to the patron object
and calls a local subroutine to set it.

This could be done more elegantly but that would require more
major refactoring of the rather messy initializer code
in ILS::Patron

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Tomás Cohen Arazi 2014-09-08 14:35:35 UTC
Is this bug 3.14-only?
Comment 10 Colin Campbell 2014-09-09 08:14:12 UTC
(In reply to Tomás Cohen Arazi from comment #9)
> Is this bug 3.14-only?

No although it was reported at 3.14 it would be applicable to later versions
Comment 11 Tomás Cohen Arazi 2014-09-23 18:50:16 UTC
Patches pushed to master.

Thanks Colin!