[Koha-bugs] [Bug 15156] Get all Borrowers with pending/unpaid fines/accountlines

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 11 13:16:57 CEST 2020


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #14 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Whilst I understand the idea behind this, I'm not sure the implementation is
good.

We iterate through all patrons in the resultset (so, if you're calling this
without having first chained it to a search) we will literally fetch all
borrowers from the db.

We're also returning a weird hasref rather than a set of Koha::Patron objects
which you could then work with further to produce the data you want.

I would also suggest that it should support the standard attribute params
available to normal searches to allow for filtering.

So.. all in all I feel we can do better.. this method should produce a joined
query that can be used inline with a method chain on Koha::Patrons...

What I'de really like to see is something along the lines:

my $filtered_patrons = Koha::Patrons->search({ whatever
})->filter_by_owes({amount => { '>=' => $max_owed }});

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


More information about the Koha-bugs mailing list