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

Martin Renvoize <martin.renvo...@ptfs-europe.com> changed:

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

--- Comment #14 from Martin Renvoize <martin.renvo...@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.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to