[Bug 22837] New: Koha::Account::Line->apply should not require a 'set' of debits
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 Bug ID: 22837 Summary: Koha::Account::Line->apply should not require a 'set' of debits 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 Target Milestone: --- As it stands the apply method in Koha::Account::Line requires a Koha::Account resultset to be passed in as the list of debits to be applied against. This is suboptimal when the method is often required to apply against the results of a Koha::Account::Line->find (single not set) as one needs to rework the query. We should accept an arrayref of results rather than requiring a resultset as converting from a set to an arrayref is simple (->as_list), but converting for a single record up to a set is considerably more challenging (both coding wise and DB hits wise). -- 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=22837 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89314&action=edit Bug 22837: Update apply to accept an arrayref This patch update the signature of Koha::Account::Line->apply to accept an arrayref of debits to apply against a credit instead of requireing a Koha::Objects set. Signed-off-by: Martin Renvoize <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=22837 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89315&action=edit Bug 22837: Update callers to use new signature -- 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=22837 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=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89314|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89316 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89316&action=edit Bug 22837: Update apply to accept an arrayref This patch update the signature of Koha::Account::Line->apply to accept an arrayref of debits to apply against a credit instead of requireing a Koha::Objects set. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89315|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89317 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89317&action=edit Bug 22837: Update callers to use new signature Test plan: Run t/db_dependent/Circulation.t, t/db_dependent/Koha/Account.t, t/db_dependent/Koha/Account/Lines.t and t/db_dependent/api/v1/patrons_accounts.t and all should pass. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |20997 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 [Bug 20997] Add Koha::Account::Line::apply -- 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=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|20997 |21607 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20997 [Bug 20997] Add Koha::Account::Line::apply https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21607 [Bug 21607] Koha::Account::Line->apply should store credit offsets as negative amounts -- 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=22837 Martin Renvoize <martin.renvoize@ptfs-europe.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=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89316|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89468&action=edit Bug 22837: Update apply to accept an arrayref This patch update the signature of Koha::Account::Line->apply to accept an arrayref of debits to apply against a credit instead of requireing a Koha::Objects set. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89317|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89469&action=edit Bug 22837: Update callers to use new signature Test plan: Run t/db_dependent/Circulation.t, t/db_dependent/Koha/Account.t, t/db_dependent/Koha/Account/Lines.t and t/db_dependent/api/v1/patrons_accounts.t and all should pass. Signed-off-by: Martin Renvoize <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=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 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=22837 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92972 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92972&action=edit Bug 22837: (follow-up) Fix some tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92973 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92973&action=edit Bug 22837: (follow-up) Fix POD -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 Liz Rea <wizzyrea@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=22837 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89468|0 |1 is obsolete| | Attachment #89469|0 |1 is obsolete| | Attachment #92972|0 |1 is obsolete| | Attachment #92973|0 |1 is obsolete| | --- Comment #9 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 92977 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92977&action=edit Bug 22837: Update apply to accept an arrayref This patch update the signature of Koha::Account::Line->apply to accept an arrayref of debits to apply against a credit instead of requireing a Koha::Objects set. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 --- Comment #10 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 92978 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92978&action=edit Bug 22837: Update callers to use new signature Test plan: Run t/db_dependent/Circulation.t, t/db_dependent/Koha/Account.t, t/db_dependent/Koha/Account/Lines.t and t/db_dependent/api/v1/patrons_accounts.t and all should pass. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 --- Comment #11 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 92979 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92979&action=edit Bug 22837: (follow-up) Fix some tests Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 --- Comment #12 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 92980 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92980&action=edit Bug 22837: (follow-up) Fix POD Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=22837 Tomás Cohen Arazi <tomascohen@gmail.com> 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=22837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92977|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=22837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92978|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=22837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92979|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=22837 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92980|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=22837 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92981 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92981&action=edit Bug 22837: Update apply to accept an arrayref This patch update the signature of Koha::Account::Line->apply to accept an arrayref of debits to apply against a credit instead of requireing a Koha::Objects set. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Liz Rea <wizzyrea@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=22837 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92982 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92982&action=edit Bug 22837: Update callers to use new signature Test plan: Run t/db_dependent/Circulation.t, t/db_dependent/Koha/Account.t, t/db_dependent/Koha/Account/Lines.t and t/db_dependent/api/v1/patrons_accounts.t and all should pass. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Liz Rea <wizzyrea@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=22837 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92983 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92983&action=edit Bug 22837: (follow-up) Fix some tests Signed-off-by: Liz Rea <wizzyrea@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=22837 --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 92984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92984&action=edit Bug 22837: (follow-up) Fix POD Signed-off-by: Liz Rea <wizzyrea@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=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to master |RESOLVED CC| |fridolin.somers@biblibre.co | |m --- Comment #18 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Enhancement not pushed to 19.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|14825 |23105 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14825 [Bug 14825] Accounts Rewrite Omnibus https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23105 [Bug 23105] Library patrons should have the ability to apply their credit against their debts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22837 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|23105 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23105 [Bug 23105] Library patrons should have the ability to apply their credit against their debts -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org