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

--- Comment #7 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 199920
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199920&action=edit
Bug 39728: Replace C4::Suggestions::GetUnprocessedSuggestions with
Koha::Suggestions

The legacy C4::Suggestions::GetUnprocessedSuggestions function used raw
DBI queries to find purchase suggestions that are still unprocessed after
a given number of days. This patch removes that function and migrates the
notice_unprocessed_suggestions.pl cron job to use the modern
Koha::Suggestions ORM with filter_by_last_update instead.

Test plan:
1. Create a purchase suggestion as a patron and assign it to a fund,
   leaving the status as 'ASKED'
2. Run misc/cronjobs/notice_unprocessed_suggestions.pl --days=0 -v -c
3. Confirm the suggestion appears in the output and the notice is sent
4. Confirm no notice is sent when running with --days=1 (suggestion is
   only 0 days old)
5. Confirm the rest of the suggestions workflow is unaffected

Signed-off-by: Owen Leonard <[email protected]>
Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
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