Issue Feature Closed

#109154Scheduler: Allow to negate negatable options

Christian Weiske 03/04/26, 14:58 updated 11/12/26, 22:12

Description

CLI command options can be of type InputOption::VALUE_NEGATABLE, which allows users to pass --option and --no-option on the command line.

When adding such a Symfony command as scheduler task, I can only choose to add this option – but not to negate that option.

Please add a way to negate CLI command options in scheduler task configuration.

——

This feature is missing from TYPO3 v12 + v13 in vendor/typo3/cms-scheduler/Classes/Task/ExecuteSchedulableCommandAdditionalFieldProvider.php, but also from TYPO3v14 in typo3/sysext/scheduler/Classes/Form/Element/SchedulableCommandConfigurationElement.php.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 4

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2026-03-04T20:41:08+00:00" > 03/04/26, 20:41 </span>

    Do you have an idea how this could be reflected in the UI?

    Do you have an example of a core command that has such negatable options?

    Additionally I wonder if maybe such commands could be reworked to not require negatable attributes (and make them “Positive” instead)?

  2. Christian Weiske commented <span data-processor="relativetime" data-value="2026-03-05T08:46:27+00:00" > 03/05/26, 08:46 </span>

    There is no core command that has a negatable option.

    I added it in a custom command that imports data and images for that data, and I needed a “don’t import images” option. So I added a “—images” option with default value “true” and made it negatable, so I can use “—no-images”.

    After discovering this missing feature here, I changed that from the negatable “—images” option to a standard “—no-images” option and had to invert the checks in my code.

    UI could be:

    [ ] Add option
    [x] Add inverted option
  3. Garvin Hicking commented and changed status Needs Feedback Accepted <span data-processor="relativetime" data-value="2026-03-05T09:50:55+00:00" > 03/05/26, 09:50 </span>

    > There is no core command that has a negatable option.

    “Phew” at least ;)

    > UI could be:

    OK, that would be my expectation then too, sounds good.

    For me personally this is a bit edge-casey, but I’d be happy to review/mentor anyone who wants to work on this. We’re pretty late in the LTS cycle so this might need to be prepared for v15.

  4. Georg Ringer commented and changed status Accepted Closed <span data-processor="relativetime" data-value="2026-11-12T22:12:45+00:00" > 11/12/26, 22:12 </span>

    Thanks for the report and for describing your use case.

    I would close this one as “won’t implement”. Negatable options are an edge case: no core command uses them, and as you found yourself, the scheduler task can be served by a plain --no-images option, with the check inverted in the command. Supporting --no-option in the scheduler would need a second control per option in the task configuration (a tri-state or an extra “inverted” checkbox), which makes the form harder to understand for every other command for the sake of a rare case.

    Therefore I’m closing this issue. Hope you understand