Review main Merged

96313[BUGFIX] Persist task parameters in SchedulerTaskRepository

Simon Schaufelberger CR +2 V +2 Normal +162 −5 updated 10/07/26, 15:09

Commit message

SchedulerTaskRepository::add() and update() did not persist task
parameters correctly:

- For native tasks, TaskService::getFieldsForRecord() returned neither
  the task specific columns nor the "parameters" field. This also
  affected console command tasks, which keep their arguments and
  options in "parameters".
- When adding a task, the DataHandler hook recreated the task object
  without its parameters, so they were overwritten by defaults.

getFieldsForRecord() now writes native task parameters that have a TCA
field to their own column and all others to "parameters", the same way
TaskSerializer reads them back. The hook applies the submitted
parameters to the task object before collecting the fields.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1014

  1. Simon Schaufelberger uploaded patch set 1 10/02/26, 12:25

  2. core-ci voted on patch set 1 V -1 10/02/26, 12:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109933

  3. Simon Schaufelberger uploaded patch set 2 V -1 10/02/26, 12:58

  4. core-ci voted on patch set 2 V +1 10/02/26, 13:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109939

  5. Simon Schaufelberger uploaded patch set 3 V +1 10/02/26, 15:02

  6. core-ci voted on patch set 3 V +1 10/02/26, 15:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109954

  7. Oli Bartsch commented on patch set 3 V -1 10/05/26, 15:56

    The add() only covers native tasks whose parameters are all TCA columns. Two cases are still broken: - Console command tasks keep their arguments and options in parameters. add() merges them as top-level fields, DataHandler drops them, and the task comes back with [] options. - update($task) has the same problem for every native task. Both come from TaskService::getFieldsForRecord() ignoring parameters for native tasks. Fixing it there, the same way TaskSerializer reads them (columns from additionalFields, everything else into parameters), covers add() and update() and makes the special case in add() unnecessary. I'll push a patch set doing that.
  8. Oli Bartsch uploaded patch set 4 V +1 10/05/26, 15:57

  9. Oli Bartsch commented on patch set 4 10/05/26, 15:58

    Reply

    Done, please check if the changes are fine for you.
  10. core-ci voted on patch set 4 V +1 10/05/26, 16:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110128

  11. Simon Schaufelberger commented on patch set 4 CR +1 V +1 10/05/26, 16:12

    Reply

    Acknowledged
  12. Benni Mack voted on patch set 4 CR +1 V +1 10/06/26, 11:14

  13. Benni Mack voted on patch set 4 CR +2 V +2 10/07/26, 15:09

  14. Benni Mack merged patch set 5 10/07/26, 15:09