feat: Rework task management in PlanBundle
- Introduced migration Version_0_13_0 to update task schema: - Changed start_date and end_date to DATE type, truncating time. - Added new columns: task_kind, definition_of_done, planned_work. - Removed parent_id and its index, replacing with a dependency graph. - Created new tables: plan_task_dependencies and plan_task_raci, including a join table for stakeholders. - Updated Version_0_4_0 migration to remove references to parent_id. - Refactored TaskModel to return tasks as flat rows with dependencies and RACI assignments. - Modified task table view to display tasks without hierarchical structure, adding badges for milestones and phases. - Enhanced task form to include dependencies and RACI roles, with appropriate macros for rendering. - Updated task list view to reflect new task structure and display status based on task kind. - Added new validation constraints for task dependencies and dates, ensuring no cycles or self-references. - Removed obsolete ValidTaskParent validation as parent-child relationships are no longer supported. - Updated translations to reflect changes in task management and new fields. - Revised documentation to describe new task handling and features.
This commit is contained in:
1 parent
8696acd01c
commit
8268fad886
33 files changed
+1454
-251
No files matched your search
@@ -26,10 +26,12 @@ class Version_0_4_0 extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Local column => [referenced table, ON DELETE action].
|
||||
*
|
||||
* parent_id is gone since 0.13.0 (the parent/child tree was replaced by the dependency graph),
|
||||
* so only plan_id is repaired here.
|
||||
*/
|
||||
private const FOREIGN_KEYS = [
|
||||
'plan_id' => [Plan::TABLE_NAME, 'CASCADE'],
|
||||
'parent_id' => [Task::TABLE_NAME, 'SET NULL'],
|
||||
'plan_id' => [Plan::TABLE_NAME, 'CASCADE'],
|
||||
];
|
||||
|
||||
protected function isApplicable(Schema $schema): bool
|
||||
@@ -40,7 +42,9 @@ class Version_0_4_0 extends AbstractMigration
|
||||
|
||||
$tasks = $this->concatPrefix(Task::TABLE_NAME);
|
||||
|
||||
return !$schema->hasTable($tasks) || [] !== $this->getMissingForeignKeys($schema->getTable($tasks));
|
||||
$table = $schema->hasTable($tasks) ? $schema->getTable($tasks) : null;
|
||||
|
||||
return null === $table || [] !== $this->getMissingForeignKeys($table);
|
||||
}
|
||||
|
||||
protected function up(): void
|
||||
|
||||
Reference in new issue
Block a user