[Bug 21720] New: Convert C4::Circulation::AddIssuingCharge to use Koha::Account->add_debit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Bug ID: 21720 Summary: Convert C4::Circulation::AddIssuingCharge to use Koha::Account->add_debit Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org All account handling should go via the Koha::Account class. -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21002 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21002 [Bug 21002] Add Koha::Account::add_debit -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Convert |Update |C4::Circulation::AddIssuing |C4::Circulation::AddIssuing |Charge to use |Charge to use |Koha::Account->add_debit |Koha::Account->add_debit -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14825 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14825 [Bug 14825] Accounts Rewrite Omnibus -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21678 -- 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=21720 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 81882 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81882&action=edit Bug 21720: Use Koha::Account->add_debit in AddIssuingCharge -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21721 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21721 [Bug 21721] Update C4::Circulation::AddRenewal to use Koha::Account->add_debit -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|14825 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14825 [Bug 14825] Accounts Rewrite Omnibus -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81882|0 |1 is obsolete| | --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 82787 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82787&action=edit Bug 21720: Use Koha::Account->add_debit in AddIssuingCharge -- 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=21720 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 82788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82788&action=edit Bug 21720: Update Tests AddIssuing charge is always called in void context, but the tests checked that the return value was a Koha::Account::Offset and we now return a Koha::Account::Line. This patch changes the test to accept a Koha::Account::Line as returned, adds a test to ensure a Koha::Account::Offset is also created and corrects the logic that tests that only one accountline is added. -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82787|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 83199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83199&action=edit Bug 21720: Use Koha::Account->add_debit in AddIssuingCharge Known Side Effect: Prior to this patch issuing charges were not recorded in the FinesLog. After this patch, if the FinesLog is enabled then the 'action' will be recorded as `create_rent`. Sponsored-by: PTFS Europe -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82788|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 83200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83200&action=edit Bug 21720: Update Tests AddIssuing charge is always called in void context, but the tests checked that the return value was a Koha::Account::Offset and we now return a Koha::Account::Line. This patch changes the test to accept a Koha::Account::Line as returned, adds a test to ensure a Koha::Account::Offset is also created and corrects the logic that tests that only one accountline is added. -- 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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21999 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21999 [Bug 21999] C4::Circulation::AddIssue uses DBIx::Class directly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- QA Question: Regarding the side effect, this is reasonably easy to avert within the add_debit method but I'd like input as to whether the FinesLog should really be just about Fines or should include all Charges.. as it stands it's a bit of a mix of both.. this patch series turns it into more of the ChargesLog but upping the logging but it could alternatively go the other way and make what is recorded a bit more explicitly about fines and only fines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Bug 21720 depends on bug 21999, which changed state. Bug 21999 Summary: C4::Circulation::AddIssue uses DBIx::Class directly https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21999 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Martin Renvoize from comment #6)
QA Question: Regarding the side effect, this is reasonably easy to avert within the add_debit method but I'd like input as to whether the FinesLog should really be just about Fines or should include all Charges.. as it stands it's a bit of a mix of both.. this patch series turns it into more of the ChargesLog but upping the logging but it could alternatively go the other way and make what is recorded a bit more explicitly about fines and only fines.
I would prefer to log all charges, not only fines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Josef Moravec <josef.moravec@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=21720 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83199|0 |1 is obsolete| | Attachment #83200|0 |1 is obsolete| | --- Comment #8 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 84271 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84271&action=edit Bug 21720: Use Koha::Account->add_debit in AddIssuingCharge Known Side Effect: Prior to this patch issuing charges were not recorded in the FinesLog. After this patch, if the FinesLog is enabled then the 'action' will be recorded as `create_rent`. Sponsored-by: PTFS Europe Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 --- Comment #9 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 84272 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84272&action=edit Bug 21720: Update Tests AddIssuing charge is always called in void context, but the tests checked that the return value was a Koha::Account::Offset and we now return a Koha::Account::Line. This patch changes the test to accept a Koha::Account::Line as returned, adds a test to ensure a Koha::Account::Offset is also created and corrects the logic that tests that only one accountline is added. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Bug 21720 depends on bug 21002, which changed state. Bug 21002 Summary: Add Koha::Account::add_debit https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21002 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |tomascohen@gmail.com 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=21720 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84272|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=21720 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84271|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=21720 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 85175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85175&action=edit Bug 21720: Use Koha::Account->add_debit in AddIssuingCharge Known Side Effect: Prior to this patch issuing charges were not recorded in the FinesLog. After this patch, if the FinesLog is enabled then the 'action' will be recorded as `create_rent`. Sponsored-by: PTFS Europe Signed-off-by: Josef Moravec <josef.moravec@gmail.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=21720 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 85176 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85176&action=edit Bug 21720: Update Tests AddIssuing charge is always called in void context, but the tests checked that the return value was a Koha::Account::Offset and we now return a Koha::Account::Line. This patch changes the test to accept a Koha::Account::Line as returned, adds a test to ensure a Koha::Account::Offset is also created and corrects the logic that tests that only one accountline is added. Signed-off-by: Josef Moravec <josef.moravec@gmail.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=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21728 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21728 [Bug 21728] Update C4::Reserves::ChargeReserveFee to use Koha::Account->add_debit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|21002 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21002 [Bug 21002] Add Koha::Account::add_debit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #12 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=21720 Bug 21720 depends on bug 21728, which changed state. Bug 21728 Summary: Update C4::Reserves::ChargeReserveFee to use Koha::Account->add_debit https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21728 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement will not be backported to the stable branch. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org