[Bug 21849] New: Two useless Koha::Account::Offset->new calls need attention
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Bug ID: 21849 Summary: Two useless Koha::Account::Offset->new calls need attention Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Came across those calls in bug 20598 in _FixOverduesOnReturn Koha::Account::Offset->new( { debit_id => $accountline->id, type => 'Forgiven', amount => $amountoutstanding * -1, } ); This does nothing if you don't store data. Not sure about severity or component. -- 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=21849 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=21849 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20598 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 82397 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82397&action=edit Bug 21849: Two useless Koha::Account::Offset->new calls need attention Came across those calls in bug 20598 in _FixOverduesOnReturn Koha::Account::Offset->new( { debit_id => $accountline->id, type => 'Forgiven', amount => $amountoutstanding * -1, } ); This does nothing if you don't store data. Test Plan: 1) Apply this patch 2) Set up 2 items with overdue fines 3) Return one with dropbox mode 4) Note the dropbox account offset is created 5) Return one with full fine forgiveness 6) Note the forgiven account offset is created -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- THis is a good opportunity to have tests for this behaviour, in preparation to the replacement of manually adding the accountline and the offset, in favour of Koha::Account methods (add_credit, add_debit and adjust). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Tomás Cohen Arazi from comment #2)
THis is a good opportunity to have tests for this behaviour, in preparation to the replacement of manually adding the accountline and the offset, in favour of Koha::Account methods (add_credit, add_debit and adjust).
Good idea. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 82404 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82404&action=edit Bug 21849: Add unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=21849 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Two useless |Offsets not stored |Koha::Account::Offset->new |correctly in |calls need attention |_FixOverduesOnReturn -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=21849 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82404|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=21849 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82397|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=21849 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82919&action=edit Bug 21849: Add unit tests 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=21849 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 82920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82920&action=edit Bug 21849: Two useless Koha::Account::Offset->new calls need attention Came across those calls in bug 20598 in _FixOverduesOnReturn Koha::Account::Offset->new( { debit_id => $accountline->id, type => 'Forgiven', amount => $amountoutstanding * -1, } ); This does nothing if you don't store data. Test Plan: 1) Apply this patch 2) Set up 2 items with overdue fines 3) Return one with dropbox mode 4) Note the dropbox account offset is created 5) Return one with full fine forgiveness 6) Note the forgiven account offset is created 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=21849 Tomás Cohen Arazi <tomascohen@gmail.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=21849 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82919|0 |1 is obsolete| | Attachment #82920|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 82947 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82947&action=edit Bug 21849: Add unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 82948 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82948&action=edit Bug 21849: Two useless Koha::Account::Offset->new calls need attention Came across those calls in bug 20598 in _FixOverduesOnReturn Koha::Account::Offset->new( { debit_id => $accountline->id, type => 'Forgiven', amount => $amountoutstanding * -1, } ); This does nothing if you don't store data. Test Plan: 1) Apply this patch 2) Set up 2 items with overdue fines 3) Return one with dropbox mode 4) Note the dropbox account offset is created 5) Return one with full fine forgiveness 6) Note the forgiven account offset is created Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 18.05 for 18.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #12 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21849 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org