open-formulieren / open-forms

Smart and dynamic forms
https://open-forms.readthedocs.io
Other
37 stars 26 forks source link

Entering '0' days for the submission pruning appears to have no effect #4815

Closed sergei-maertens closed 1 week ago

sergei-maertens commented 1 week ago

Product versie / Product version

2.8.1

Customer reference

Taiga DH #715

Omschrijf het probleem / Describe the bug

There are global and form-specific configuration options to prune submissions (in various states, like completed/suspended/ongoing/...) after a certain number of days. The amount of days can be configured in the admin interface. A celery task (via beat) picks up the submissions that need to be pruned.

Setting the number of days to '0' seems to cause these submissions not to be pruned, while the expectation is that these would be removed on the first next run of the cleanup job.

Stappen om te reproduceren / Steps to reproduce

(unconfirmed)

  1. Create a form, set the cleanup days to '0'
  2. Start a submission and complete it
  3. Trigger the cleanup task/job
  4. Observe that the submission is not deleted

Verwacht gedrag / Expected behavior

Submission is deleted after next scheduled cleanup job run.

Screen resolution

None

Device

None

OS

None

Browser

No response

robinmolen commented 1 week ago

Setting the number of days to 0 is done in the "Data removal" tab, right? When I set the value 0, I get an error message saying that the number of days should be equal or greater than 1:

Screenshot 2024-11-08 at 13 45 06

So setting the number of days to 0 shouldn't happen?

(Edit, in the global config the value 0 also isn't allowed..)

robinmolen commented 1 week ago

Discussed with Sergei, we are gonna change the minimum value to 0

robinmolen commented 1 week ago

The minimum value for the submission removal is changed to 0.

The celery beat submission removal schedule is currently set to once a day (at 1 AM). @joeribekker @sergei-maertens do we want to set this to something like once a hour? Or even sooner, like once a minute?

sergei-maertens commented 1 week ago

Once a day is fine