]> git.koha-community.org Git - koha.git/commit
Bug 30663: Add Koha::Suggestions helper methods
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 3 May 2022 14:18:10 +0000 (11:18 -0300)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Sat, 25 Jun 2022 02:45:09 +0000 (04:45 +0200)
commit9794624aa43594b2a4dc1c1325cd269ae4b66a0d
tree4823ace4608fa6f7750deca20886aa5c038f2972
parent0d9bdc015d1fffa38b3210d29b7f2ef4c70480e7
Bug 30663: Add Koha::Suggestions helper methods

This patch adds the following helper methods:

* filter_by_pending
* filter_by_suggested_days_range

This methods follow basically what's done in opac-suggestions.pl
I chose 'pending' as opposed to 'open' to follow what we use in the UI
which might be the case because of being more accurate for end users.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Suggestions.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 54dbb852486b004a73dc6aabae6dda4fcecb2573)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/Suggestions.pm
t/db_dependent/Koha/Suggestions.t