[Bug 29755] New: SIP2 code does not correctly handle NoIssuesChargeGuarantees or NoIssuesChargeGuarantorsWithGuarantees
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Bug ID: 29755 Summary: SIP2 code does not correctly handle NoIssuesChargeGuarantees or NoIssuesChargeGuarantorsWithGuarantees Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org The sip code always checks noissuescharge as the limit for fines, never the other possible limits -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29754 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 130449 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130449&action=edit Bug 29755: Check each NoIssuesCharge separately This patch updates SIP patron code to use account methods to calculate balances over the patronflags returns. It also checks if patron should be blocked for each 'No Issues charge' preference Tests are added for NoIssuesChargeGuarantees To test: 1 - Set noissuescharge preference to 5 2 - Add a $10 charge to a patron 3 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE 4 - Note the 64 message starts with Y's that mean patron is blocked 5 - Set noissuescharge to 11 6 - Repeat 3, patron is no longer blocked 7 - Set NoIssuesChargeGuarantees to 8 8 - Repeat 3, patron is blocked 9 - Pay $3 on patron so they owe 7 10 - Repeat 3, patron is not blocked 11 - Add a child account with patron as guarantor 12 - Repeat 3, patron is not blocked 13 - Add a $4 charge to child 14 - Repeat 3, patron is blocked 15 - Repeat 3, but with child barcode, child is not blocked 16 - Set NoIssuesChargeGuarantorsWithGuarantees to 11 17 - Repeat 3, patron is blocked 18 - Repeat 3 with child barcode, child is blocked -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130449|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 134196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134196&action=edit Bug 29755: Check each NoIssuesCharge separately This patch updates SIP patron code to use account methods to calculate balances over the patronflags returns. It also checks if patron should be blocked for each 'No Issues charge' preference Tests are added for NoIssuesChargeGuarantees To test: 1 - Set noissuescharge preference to 5 2 - Add a $10 charge to a patron 3 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE 4 - Note the 64 message starts with Y's that mean patron is blocked 5 - Set noissuescharge to 11 6 - Repeat 3, patron is no longer blocked 7 - Set NoIssuesChargeGuarantees to 8 8 - Repeat 3, patron is blocked 9 - Pay $3 on patron so they owe 7 10 - Repeat 3, patron is not blocked 11 - Add a child account with patron as guarantor 12 - Repeat 3, patron is not blocked 13 - Add a $4 charge to child 14 - Repeat 3, patron is blocked 15 - Repeat 3, but with child barcode, child is not blocked 16 - Set NoIssuesChargeGuarantorsWithGuarantees to 11 17 - Repeat 3, patron is blocked 18 - Repeat 3 with child barcode, child is blocked Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- After signing off, I ran the tests and they failed: prove t/db_dependent/SIP/Patron.t t/db_dependent/SIP/Patron.t .. 8/10 # Failed test 'Guarantee only fines correctly counted' # at t/db_dependent/SIP/Patron.t line 318. # got: '11.11' # expected: '0.11' # Failed test 'Guarantee not blocked by guarantor fines' # at t/db_dependent/SIP/Patron.t line 319. # Looks like you failed 2 tests of 4. t/db_dependent/SIP/Patron.t .. 9/10 # Failed test 'NoIssuesChargeGuarantees tests' # at t/db_dependent/SIP/Patron.t line 322. t/db_dependent/SIP/Patron.t .. 10/10 # Looks like you failed 1 test of 10. t/db_dependent/SIP/Patron.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/10 subtests Test Summary Report ------------------- t/db_dependent/SIP/Patron.t (Wstat: 256 Tests: 10 Failed: 1) Failed test: 9 Non-zero exit status: 1 Files=1, Tests=10, 9 wallclock secs ( 0.04 usr 0.01 sys + 7.56 cusr 1.12 csys = 8.73 CPU) Result: FAIL Also, for steps 16-18 of the test plan, I think step 16 needs changing to "16 - Set NoIssuesChargeGuarantorsWithGuarantees to 10", rather than 11. - If 11 is used, the patrons and the child are not blocked. - The wording for the system preference is "Prevent a patron from checking out if the patron has guarantors and those guarantor's guarantees owing in total more than X USD in fines." - The key part is "MORE THAN X USD". In the test, the total is 11. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes SIP2 so that it release notes| |correctly determines if | |issues should be blocked | |for patrons when the | |NoIssuesChargeGuarantees | |and | |NoIssuesChargeGuarantorsWit | |hGuarantees system | |preferences are set. | |Currently, it only checks | |the noissuescharge system | |preference as the limit for | |charges, and not the other | |'No Issues charge' system | |preferences. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134196|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134221 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134221&action=edit Bug 29755: Check each NoIssuesCharge separately This patch updates SIP patron code to use account methods to calculate balances over the patronflags returns. It also checks if patron should be blocked for each 'No Issues charge' preference Tests are added for NoIssuesChargeGuarantees To test: 1 - Set noissuescharge preference to 5 2 - Add a $10 charge to a patron 3 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE 4 - Note the 64 message starts with Y's that mean patron is blocked 5 - Set noissuescharge to 11 6 - Repeat 3, patron is no longer blocked 7 - Set NoIssuesChargeGuarantees to 8 8 - Repeat 3, patron is blocked 9 - Pay $3 on patron so they owe 7 10 - Repeat 3, patron is not blocked 11 - Add a child account with patron as guarantor 12 - Repeat 3, patron is not blocked 13 - Add a $4 charge to child 14 - Repeat 3, patron is blocked 15 - Repeat 3, but with child barcode, child is not blocked 16 - Set NoIssuesChargeGuarantorsWithGuarantees to 10 17 - Repeat 3, patron is blocked 18 - Repeat 3 with child barcode, child is blocked Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134222 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134222&action=edit Bug 29755: (follow-up) Mock NoIssuesChargeGuarantorsWithGuarantees in test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134221|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 134297 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134297&action=edit Bug 29755: Check each NoIssuesCharge separately This patch updates SIP patron code to use account methods to calculate balances over the patronflags returns. It also checks if patron should be blocked for each 'No Issues charge' preference Tests are added for NoIssuesChargeGuarantees To test: 1 - Set noissuescharge preference to 5 2 - Add a $10 charge to a patron 3 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE 4 - Note the 64 message starts with Y's that mean patron is blocked 5 - Set noissuescharge to 11 6 - Repeat 3, patron is no longer blocked 7 - Set NoIssuesChargeGuarantees to 8 8 - Repeat 3, patron is blocked 9 - Pay $3 on patron so they owe 7 10 - Repeat 3, patron is not blocked 11 - Add a child account with patron as guarantor 12 - Repeat 3, patron is not blocked 13 - Add a $4 charge to child 14 - Repeat 3, patron is blocked 15 - Repeat 3, but with child barcode, child is not blocked 16 - Set NoIssuesChargeGuarantorsWithGuarantees to 10 17 - Repeat 3, patron is blocked 18 - Repeat 3 with child barcode, child is blocked Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134222|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 134299 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134299&action=edit Bug 29755: (follow-up) Mock NoIssuesChargeGuarantorsWithGuarantees in test Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134297|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134725 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134725&action=edit Bug 29755: Check each NoIssuesCharge separately This patch updates SIP patron code to use account methods to calculate balances over the patronflags returns. It also checks if patron should be blocked for each 'No Issues charge' preference Tests are added for NoIssuesChargeGuarantees To test: 1 - Set noissuescharge preference to 5 2 - Add a $10 charge to a patron 3 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE 4 - Note the 64 message starts with Y's that mean patron is blocked 5 - Set noissuescharge to 11 6 - Repeat 3, patron is no longer blocked 7 - Set NoIssuesChargeGuarantees to 8 8 - Repeat 3, patron is blocked 9 - Pay $3 on patron so they owe 7 10 - Repeat 3, patron is not blocked 11 - Add a child account with patron as guarantor 12 - Repeat 3, patron is not blocked 13 - Add a $4 charge to child 14 - Repeat 3, patron is blocked 15 - Repeat 3, but with child barcode, child is not blocked 16 - Set NoIssuesChargeGuarantorsWithGuarantees to 10 17 - Repeat 3, patron is blocked 18 - Repeat 3 with child barcode, child is blocked Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134299|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134726 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134726&action=edit Bug 29755: (follow-up) Mock NoIssuesChargeGuarantorsWithGuarantees in test Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice to see this migration to using Koha::Patron objects and methods.. works as expected and no regressions found. Tests all passing and QA script is happy PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32624 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32624 [Bug 32624] Patrons fines are not accurate in SIP2 when NoIssuesChargeGuarantorsWithGuarantees or NoIssuesChargeGuarantees are enabled -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11.18 released in| | CC| |arthur.suzuki@biblibre.com Status|Pushed to master |Pushed to stable --- Comment #12 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11.x for 21.11.18 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #13 from wainuiwitikapark@catalyst.net.nz --- Not backported to 21.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29755 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33411 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33411 [Bug 33411] SIP2 includes other guarantees with the same guarantor when calculating against NoIssuesChargeGuarantees -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org