[Bug 22037] New: regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] New: regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

            Bug ID: 22037
           Summary: regression: guarantor no longer blocked (debarred) if
                    child is over limit, when checking out via SIP.
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: SIP2
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email]
  Target Milestone: ---

Currently on 18.05.06.

I have two sample patrons set up.  XXXXXXXX (an adult patron) and
YYYYYYYYYY (a child patron).  XXXXXXXX is the guarantor for YYYYYYYYYY
and I have put a 12.00 fee on YYYYYYYYYY's account.  Because of our
system settings, a fee of 10.01 or over on a child's account should
block checkouts by the adult guarantor and, in this case it does.  If I
go to XXXXXXXX's account in Koha I get the "Fees & Charges: Patron's
guarantees collectively owe 12.00. Checkouts are BLOCKED because fine
balance is OVER THE LIMIT." message that I expect to see and the patron
is blocked from checkout in the staff client.

In a SIP2 transaction, however, XXXXXXXX is not blocked.

Prior to our upgrade this scenario would cause XXXXXXXX's account to send
a SIP2 PI response of 'N.'  Since the upgrade, the guarantor account with
an over-limit guarantee is not triggering an 'N' response in the PI field
- it's coming through as PIY as seen in the sample SIP response below:

--> 6300120181220    150631        
AOLEAVENWRTH|AAXXXXXXXX|AD1234|BP1|BQ5|AY2AZEE0C
<-- 64              00120181220  
150632000000000000000000000000AOLEAVENWRTH|AAXXXXXXXX|AESIP
Test|BLY|CQY|CC10|PB19000101|PCADULT|PIY|AFGreetings from Koha.
|AFLEAVENWRTH|AY2AZD277

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

Barton Chittenden <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

George Williams (NEKLS) <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|[hidden email]-commun |[hidden email]-c
                   |ity.org                     |ommunity.org
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--- Comment #1 from Jonathan Druart <[hidden email]> ---
Certainly caused by
  commit bddfed75913a2302c19c00b00a6fe86538af6f9f
  Bug 19933: Remove patronflags - tricky ones

Which wrongly said "This patch only deal with the circulation code as I am not
convident enough with SIP code"... hum...

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

--- Comment #2 from Jonathan Druart <[hidden email]> ---
Created attachment 83436
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83436&action=edit
Bug 22037: Block SIP checkout if guarantees have debt

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

--- Comment #3 from Jonathan Druart <[hidden email]> ---
Could you test this patch Barton?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

--- Comment #4 from Barton Chittenden <[hidden email]> ---
Jonathan,

I'm in the proccess of spinning up a new kohadevbox, I'll test tomorrow. In the
mean time, do you mind writing up a test plan?

Oh, and just for the sake of completeness, here's how to replicate, as far as I
can tell:

1) Set up patrons GUARANTOR and CHILD, set GUARANTOR as the guarantor for
CHILD.
2) Set sysprefs: noissuescharge = 10, NoIssuesChargeGuarantees = 10
3) Charge CHILD a fee of 12.00
4) Send a SIP 63 message for GUARANTOR
5) The SIP 64 reply will contain PIY rather than PIN.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

--- Comment #5 from Barton Chittenden <[hidden email]> ---
Forwarded from George Williamson (NEKLS):

The patch does not fix the problem on our production server.

I've still got the same test patrons set up with the same parameters as in the
original message.  Running the same test now, the adult patron still shows PI =
Y.  Prior to Koha 18.05 the message would have been PI = N.

This is the result of the test I just ran a few moments ago:

--> 6300120190211    092532        
AOLEAVENWRTH|AA89898971|ADXXXX|BP1|BQ5|AY1AZEE08
<-- 64              00120190211  
092532000000000000000000000000AOLEAVENWRTH|AA89898971|AESIP
Test|BLY|CQY|CC10|PB19000101|PCADULT|PIY|AFGreetings from Koha.
|AFLEAVENWRTH|AY1AZD274

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |In Discussion

--- Comment #6 from Jonathan Druart <[hidden email]> ---
I can see the problem, it is obvious, we should test CHARGES_GUARANTEES, not
CHARGES.
But I do not understand how it is a regression, regarding git log it sounds
more like a long standing bug.

Can you give me an exact Koha version where the bug happens?

Tested on 17.11.x (HEAD is 71565cb9bc3bc73cd4114217ea4206879a4f2c23) and it
seems that the output is wrong as well.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

--- Comment #7 from Jonathan Druart <[hidden email]> ---
On master, as well as 17.11.x, I get:

misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL
--patron 23529000035676 -m patron_information               1 ↵ [10:36:30]
Attempting socket connection to localhost:6001...connected!
SEND: 9300CNterm1|COterm1|CPCPL|
READ: 941

Trying 'patron_information'
SEND: 6300120190222    103634          AOCPL|AA23529000035676|ACterm1|
READ: 64              00120190222  
103635000000000000000000000000AOCPL|AA23529000035676|AEHenry
Acevedo|BLY|CC10|BD4345 Library Rd. Springfield, MA 44224|BF(212)
555-1212|PB19580530|PCS|PIY|AFGreetings from Koha. |


Last test was on 17.11.x with:

MariaDB [koha_kohadev]> select borrowernumber, cardnumber, guarantorid from
borrowers where guarantorid is not null;                                        
+----------------+----------------+-------------+
| borrowernumber | cardnumber     | guarantorid |
+----------------+----------------+-------------+
|             37 | 23529000197047 |          19 |
+----------------+----------------+-------------+
1 row in set (0.00 sec)

MariaDB [koha_kohadev]> select borrowernumber, cardnumber from borrowers where
borrowernumber=19;
+----------------+----------------+
| borrowernumber | cardnumber     |
+----------------+----------------+
|             19 | 23529000035676 |
+----------------+----------------+


MariaDB [koha_kohadev]> select amount from accountlines where
borrowernumber=37;
+-----------+
| amount    |
+-----------+
| 12.000000 |
+-----------+


MariaDB [koha_kohadev]> select variable, value from systempreferences where
variable like "noissuescharge%";
+--------------------------+-------+
| variable                 | value |
+--------------------------+-------+
| noissuescharge           | 10    |
| NoIssuesChargeGuarantees | 10    |
+--------------------------+-------+
2 rows in set (0.00 sec)


I do see "Fees & Charges: Patron's guarantees collectively owe 12.00. Checkouts
are BLOCKED because fine balance is OVER THE LIMIT." on the guarantor account.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

Kyle M Hall <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #8 from Kyle M Hall <[hidden email]> ---
Jonathan,

First, does the patch you've attached here fix a bug? If so, we should probably
get it onto a fresh bug report.

Second, since the behavior we want *is* new, we need to add a sip2 parameter
for it. Do you agree?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

--- Comment #9 from Jonathan Druart <[hidden email]> ---
Hi Kyle,
This patch is supposed to fix the regression caused by:
  Bug 19933: Remove patronflags - tricky ones

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

--- Comment #10 from Kyle M Hall <[hidden email]> ---
(In reply to Jonathan Druart from comment #9)
> Hi Kyle,
> This patch is supposed to fix the regression caused by:
>   Bug 19933: Remove patronflags - tricky ones

Jonathan, what do you think needs to happen to get this bug solved?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22037] regression: guarantor no longer blocked (debarred) if child is over limit, when checking out via SIP.

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22037

--- Comment #11 from Jonathan Druart <[hidden email]> ---
Either there is a regression and we can fix it with the submitted patch. Or we
want to fix a long standing bug and in that case more work is needed.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/