[Bug 29754] New: Patron fines counted twice for SIP when NoIssuesChargeGuarantorsWithGuarantees is enabled
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 Bug ID: 29754 Summary: Patron fines counted twice for SIP when NoIssuesChargeGuarantorsWithGuarantees is enabled 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 check for fines amount when using this pref fetches the patrons fines, then adds the total fines with guarantors, including this borrowers fines. This means the patrons own fines are doubled -- 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=29754 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=29754 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 128863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128863&action=edit Bug 29754: Unit test This adds a unit test to the SIP code It also adds some spacing and dividers to make the tests for 'relationships_debt' easier to read To test: prove -v t/db_dependent/Koha/Patron.t - passes and is readable prove -v t/db_dependent/SIP/Patron.t - fails -- 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=29754 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 128864 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128864&action=edit Bug 29754: Don't include patron when fetching guarantees fines This patch removes the flag to fetch the patrons own debts as we have already calculated them This test plan highlights another issue - the value of NoIssuesChargeGuarantorsWithGuarantees is not checked in SIP code - we merely get the total owed including guarantees and compares to noissuescharge See bug 29755 To test: 1 - Apply first patch only 2 - prove t/db_dependent/SIP/Patron.t 3 - It fails 4 - Enable NoIssuesChargeGuarantorsWithGuarantees, you can set to 1 5 - Create/find a patron 6 - Add a $10 charge to parons account 7 - Add a guarantee to patron 8 - Add a $5 charge to guarantee 9 - Set noissuescharge to 15.01 10 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE 11 - Note the 64 message starts with Y's that mean patron is blocked 12 - Patron shouldn't be blocked as under 15.01 13 - Apply patch 14 - Restart all 15 - repeat 10 16 - Patron is no longer 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=29754 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Ah, simpler to check correct total, 'BV' field in SIP response will be 25 before patch, 15 after -- 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=29754 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29755 Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | CC| |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com -- 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=29754 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128863|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 129732 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129732&action=edit Bug 29754: Unit test This adds a unit test to the SIP code It also adds some spacing and dividers to make the tests for 'relationships_debt' easier to read To test: prove -v t/db_dependent/Koha/Patron.t - passes and is readable prove -v t/db_dependent/SIP/Patron.t - fails 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=29754 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128864|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 129733 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129733&action=edit Bug 29754: Don't include patron when fetching guarantees fines This patch removes the flag to fetch the patrons own debts as we have already calculated them This test plan highlights another issue - the value of NoIssuesChargeGuarantorsWithGuarantees is not checked in SIP code - we merely get the total owed including guarantees and compares to noissuescharge See bug 29755 To test: 1 - Apply first patch only 2 - prove t/db_dependent/SIP/Patron.t 3 - It fails 4 - Enable NoIssuesChargeGuarantorsWithGuarantees, you can set to 1 5 - Create/find a patron 6 - Add a $10 charge to parons account 7 - Add a guarantee to patron 8 - Add a $5 charge to guarantee 9 - Set noissuescharge to 15.01 10 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE 11 - Note the 64 message starts with Y's that mean patron is blocked 12 - Patron shouldn't be blocked as under 15.01 13 - Apply patch 14 - Restart all 15 - repeat 10 16 - Patron is no longer blocked 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=29754 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Logic follows, this works as expected and includes the requisite unit tests. Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129732|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129733|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130213 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130213&action=edit Bug 29754: Unit test This adds a unit test to the SIP code It also adds some spacing and dividers to make the tests for 'relationships_debt' easier to read To test: prove -v t/db_dependent/Koha/Patron.t - passes and is readable prove -v t/db_dependent/SIP/Patron.t - fails Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130214&action=edit Bug 29754: Don't include patron when fetching guarantees fines This patch removes the flag to fetch the patrons own debts as we have already calculated them This test plan highlights another issue - the value of NoIssuesChargeGuarantorsWithGuarantees is not checked in SIP code - we merely get the total owed including guarantees and compares to noissuescharge See bug 29755 To test: 1 - Apply first patch only 2 - prove t/db_dependent/SIP/Patron.t 3 - It fails 4 - Enable NoIssuesChargeGuarantorsWithGuarantees, you can set to 1 5 - Create/find a patron 6 - Add a $10 charge to parons account 7 - Add a guarantee to patron 8 - Add a $5 charge to guarantee 9 - Set noissuescharge to 15.01 10 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE 11 - Note the 64 message starts with Y's that mean patron is blocked 12 - Patron shouldn't be blocked as under 15.01 13 - Apply patch 14 - Restart all 15 - repeat 10 16 - Patron is no longer blocked Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 130215 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130215&action=edit Bug 29754: (QA follow-up) Minor tests tweaks This patch does two things: - Wraps the new SIP tests in a single transaction. We do that to avoid sub-test interference, specially when test files get big. The provided tests are correct and don't require previous tests data. - Migrated from the introduced 'diag' calls to 'note', as I just learned they are the same, but 'note' is only displayed when in verbose mode. Which is great to avoid unnecessary noise in Jenkins. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 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=29754 --- Comment #10 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=29754 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11.03 released in| | Status|Pushed to master |Pushed to stable --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable Version(s)|22.05.00,21.11.03 |22.05.00,21.11.03,21.05.11 released in| | --- Comment #12 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable CC| |victor@tuxayo.net Version(s)|22.05.00,21.11.03,21.05.11 |22.05.00,21.11.03,21.05.11, released in| |20.11.17 --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 20.11.x branch for 20.11.17 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29754 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #14 from wainuiwitikapark@catalyst.net.nz --- Does this need to be backported to 19.11.x? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org