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
@@ -50,8 +50,7 @@
|
||||
{% for row in taskTree %}
|
||||
{% set task = row.task %}
|
||||
{% set canEdit = not readOnly and securityHasEntityAccess(taskPermissions['plan:tasks:editown']|default(false), taskPermissions['plan:tasks:editother']|default(false), task.createdBy) %}
|
||||
{% set childCount = taskTree|filter(r => r.task.parent and r.task.parent.id == task.id)|length %}
|
||||
<tr class="plan-task" data-task-id="{{ task.id }}" data-depth="{{ row.depth }}">
|
||||
<tr class="plan-task" data-task-id="{{ task.id }}">
|
||||
<td class="plan-col-pictogram text-center">
|
||||
{% set taskTypeIcon = plan_item_type_icon('task', task.type) %}
|
||||
{% if taskTypeIcon %}<i class="{{ taskTypeIcon }} plan-item-type-icon" style="font-size: 24px;" aria-hidden="true"></i>{% endif %}
|
||||
@@ -60,19 +59,16 @@
|
||||
{{ plan_item_type_name('task', task.type) ?? 'mautic.plan.description_item.type.unknown'|trans({'%key%': task.type}) }}
|
||||
</td>
|
||||
<td class="plan-col-name">
|
||||
<span style="display: inline-block; padding-left: {{ row.depth * 24 }}px;">
|
||||
{% if row.depth > 0 %}
|
||||
<i class="ri-corner-down-right-line text-muted" title="{{ 'mautic.plan.task.subtask_of'|trans({'%parent%': task.parent.name}) }}"></i>
|
||||
{% endif %}
|
||||
{% if canEdit %}
|
||||
<a href="{{ path('plan_task_action', {'objectAction': 'edit', 'objectId': task.id, 'returnTo': 'plan'}) }}" data-toggle="ajax">{{ task.name }}</a>
|
||||
{% else %}
|
||||
{{ task.name }}
|
||||
{% endif %}
|
||||
{% if childCount > 0 %}
|
||||
<span class="text-muted small" title="{{ 'mautic.plan.task.subtasks'|trans }}">({{ childCount }})</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% if canEdit %}
|
||||
<a href="{{ path('plan_task_action', {'objectAction': 'edit', 'objectId': task.id, 'returnTo': 'plan'}) }}" data-toggle="ajax">{{ task.name }}</a>
|
||||
{% else %}
|
||||
{{ task.name }}
|
||||
{% endif %}
|
||||
{% if task.taskKind == constant('MauticPlugin\\PlanBundle\\Entity\\TaskKind::Milestone') %}
|
||||
<span class="label label-success" title="{{ 'mautic.plan.task.kind.milestone'|trans }}">{{ 'mautic.plan.task.kind.milestone_short'|trans }}</span>
|
||||
{% elseif task.taskKind == constant('MauticPlugin\\PlanBundle\\Entity\\TaskKind::Phase') %}
|
||||
<span class="label label-primary" title="{{ 'mautic.plan.task.kind.phase'|trans }}">{{ 'mautic.plan.task.kind.phase_short'|trans }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="plan-col-description text-muted">
|
||||
{# Same 10-line clamp and read-more as the Description tab; URLs become links. #}
|
||||
@@ -81,9 +77,14 @@
|
||||
'id': 'plan-task-desc-' ~ task.id,
|
||||
}) }}
|
||||
</td>
|
||||
<td class="plan-col-date">{{ task.startDate ? dateToFull(task.startDate) : '' }}</td>
|
||||
<td class="plan-col-date">{{ task.endDate ? dateToFull(task.endDate) : '' }}</td>
|
||||
<td class="plan-col-status"><span class="label {{ task.status.labelClass }}">{{ task.status.labelKey|trans }}</span></td>
|
||||
<td class="plan-col-date">{{ task.startDate ? task.startDate|date('Y-m-d') : '' }}</td>
|
||||
<td class="plan-col-date">{{ task.endDate ? task.endDate|date('Y-m-d') : '' }}</td>
|
||||
<td class="plan-col-status">
|
||||
{# A phase has no status of its own — skip the column value. #}
|
||||
{% if task.taskKind != constant('MauticPlugin\\PlanBundle\\Entity\\TaskKind::Phase') %}
|
||||
<span class="label {{ task.status.labelClass }}">{{ task.status.labelKey|trans }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
Reference in new issue
Block a user