Bug 40044 - purge_suggestions.pl deletes ongoing suggestions
Summary: purge_suggestions.pl deletes ongoing suggestions
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-02 09:21 UTC by Marion Durand
Modified: 2025-06-02 09:21 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marion Durand 2025-06-02 09:21:48 UTC
The cronjob purge_suggestions.pl deletes all suggestions that are older than the parameter (--days or syspref PurgeSuggestionsOlderThan) and that are in any other status than 'ASKED' (due to the use of function C4::Suggestions::DelSuggestionsOlderThan). 

This can lead to delete suggestions on an ongoing order (status ORDERED) or suggestions that have been accepted but not ordered yet (status ACCEPTED).

We should limit (or add an option to limit) this script to REJECTED or AVAILABLE suggestions, as these are suggestions at the end of the process.