Files
mautic-marketing-program-bu…/Tests
alexandre_gain_mt3s 603e564037 fix(task): task creation broke on save - task_kind could reach the database as null
A new Task's taskKind property defaulted to null (the 0.18.x task rework), while
the task_kind column is NOT NULL: Doctrine writes every column explicitly, so
the column's own default never applied and any save whose form field did not
map failed with "1048 Column 'task_kind' cannot be null".

- Task::$taskKind now defaults to TaskKind::Task, like $status: the property
  is never null anymore and the getter is straight
- setTaskKind()/setStatus() accept null as "keep the current kind/status", so
  a missing form field can neither throw at mapping time nor wipe the value
- TaskType defaults an absent or empty taskKind to a regular task on PRE_SUBMIT
- regression tests: Tests/Unit/Entity/TaskTest.php
2026-11-21 14:31:49 +01:00
..