Issue Bug Resolved

#111684Scheduler: Unchecking all options of a command task does not persist

Georg Ringer 11/30/26, 09:45 updated 11/30/26, 16:15

Description

Steps to reproduce

  1. Create a scheduler task for a schedulable command that has several options, e.g. cleanup:localprocessedfiles (options --dry-run, --all, --force).
  2. Edit the task, enable at least one option and save.
  3. Edit the task again, uncheck all enabled options and save.

Expected

All options are disabled after saving.

Actual

The previously enabled options are enabled again after saving. Unchecking only some of the options works, only unchecking all of them fails.

Cause

Unchecked checkboxes are not submitted by the browser. If no option is checked, parameters[options] is missing in the request completely. SchedulerTaskPersistenceValidator merges the submitted parameters into the existing ones with array_replace(), so the stored options are kept.

Solution

Render a hidden field with the value 0 in front of each option checkbox in CommandConfiguration.fluid.html, so parameters[options] is always part of the request.
```

Reviews 2

History 13

  1. Gerrit Code Review pushed patch set 1 for main to change 98202 status New Under Review 11/30/26, 09:47

  2. Gerrit Code Review pushed patch set 1 for 14.3 to change 98235 11/30/26, 16:07

  3. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % 11/30/26, 16:15

    Applied in changeset commit:484bc0f7068f7a7f2ede7de5a7468b43c9e39764.