[Koha-bugs] [Bug 11983] code to select patrons to purge needs to be centralized

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 6 17:58:11 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11983

--- Comment #8 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
So the core proposal here is that we stop adding `->search_for_functionality_x`
methods to the DB level Koha::Objects and rather add generalized filters for
complex joins etc if we need to.

If we really want to add a `for_functionality_x` method/routine to centralize
code for say patron manipulations (where we may have a UI and Script driven
element) we should break that out into a subclass of some kind that contains
the functions/methods for just that area of functionality. 
Koha::Patron::BulkActions perhaps as an example.. containing
`->bulk_selection(filter_a, filter_b)` which internally just calls either a
large constructed query (like the code in option 1) or a chained set of queries
(from option 2) and then various available `->bulk_actions` that may be applied
to the selected set. `->bulk_delete`, `bulk_anonymise`, `bulk_modify` for
example?

Thoughts?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list