[Bug 24009] New: Koha::Account->outstanding_debits should support inline filtering
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 Bug ID: 24009 Summary: Koha::Account->outstanding_debits should support inline filtering 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 We have a number of places where we want to get a specific list of outstanding debits for comparison.. at the moment one would have to construct a search directly by inspecting system preferences at the controller level. By addins a filter option to oustanding_debits we can move that back to the object level without having to add additional methods. -- 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=24009 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24007 -- 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=24009 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 95271 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95271&action=edit Bug 24009: Add filter_by option to outstanding_debits This patch adds an optional 'filter_by' arguament to Koha::Account->outstanding_debits which current accepts 'blocks_issue' and will filter down the result set of outstanding_debits based upon the values of the following system preferences. * `HoldsInNoissuesCharge` * `RentalsInNoissuesCharge` * `ManInvInNoissuesCharge` -- 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=24009 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 95272 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95272&action=edit Bug 24009: Add Unit Tests -- 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=24009 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 the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 Tomás Cohen Arazi <tomascohen@gmail.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=24009 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24007 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24007 [Bug 24007] Koha::Account::non_issues_charges is badly named -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24007 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I like this. It is in the lines of what we've been thinking when Koha::Account was conceived, right Kyle? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 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=24009 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95272|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=24009 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95271|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=24009 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 95345 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95345&action=edit Bug 24009: Add filter_by option to outstanding_debits This patch adds an optional 'filter_by' argument to Koha::Account->outstanding_debits which current accepts 'blocks_issue' and will filter down the result set of outstanding_debits based upon the values of the following system preferences. * `HoldsInNoissuesCharge` * `RentalsInNoissuesCharge` * `ManInvInNoissuesCharge` 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=24009 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 95346 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95346&action=edit Bug 24009: 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=24009 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I understood that filter_by* must be methods, not argument. Should not we have ->outstanding_debits->filter_by_blocks_issue instead? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good catch... we've hardly settled on a pattern yet but I think your right, that's the closest we got so far. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 Bouzid Fergani <bouzid.fergani@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95346|0 |1 is obsolete| | --- Comment #8 from Bouzid Fergani <bouzid.fergani@inlibro.com> --- Created attachment 99041 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99041&action=edit Bug 24009: Add Unit Tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 Bouzid Fergani <bouzid.fergani@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95345|0 |1 is obsolete| | --- Comment #9 from Bouzid Fergani <bouzid.fergani@inlibro.com> --- Created attachment 99042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99042&action=edit Bug 24009: Add filter_by option to outstanding_debits This patch adds an optional 'filter_by' argument to Koha::Account->outstanding_debits which current accepts 'blocks_issue' and will filter down the result set of outstanding_debits based upon the values of the following system preferences. * `HoldsInNoissuesCharge` * `RentalsInNoissuesCharge` * `ManInvInNoissuesCharge` Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 Bouzid Fergani <bouzid.fergani@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99041|0 |1 is obsolete| | --- Comment #10 from Bouzid Fergani <bouzid.fergani@inlibro.com> --- Created attachment 99043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99043&action=edit Bug 24009: Add Unit Tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Did not we decided to have ->filter_by_* methods? I do not think we should introduce this pattern (ie. having filter_by in parameter), we may end up with huge and complex methods. However I really like the idea of ->filter_by_* chained methods to filter a set. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #11)
Did not we decided to have ->filter_by_* methods? I do not think we should introduce this pattern (ie. having filter_by in parameter), we may end up with huge and complex methods.
However I really like the idea of ->filter_by_* chained methods to filter a set.
I repeated what I said few months ago in comment 6 actually. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #11)
Did not we decided to have ->filter_by_* methods? I do not think we should introduce this pattern (ie. having filter_by in parameter), we may end up with huge and complex methods.
However I really like the idea of ->filter_by_* chained methods to filter a set.
I don't remember that discussion to evolve more than what was proposed on that bug... what was it... I think chaining filter_by_* could be really cool. I think Martin ended up implementing this way because we didn't have a clear consensus. But I missed many dev meetings as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- See bug 11983. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I've been trying to get back onto these two for ages.. bug 11983 is mid-rebase.. I'd love to see a consensus and movement on that bug and have it unlock a few patterns for us, but alas.. time is getting the better of me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- We have some filter_by_* methods already, and I wrote them few that are in the pipe. What about moving the parameter to a new method? That seems a quite trivial to get a PQA stamp :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- We have some filter_by_* methods already, and I wrote few more that are in the pipe. What about moving the parameter to a new method? That seems a quite trivial to get a PQA stamp :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24009 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |WONTFIX -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org