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
@@ -10,6 +10,57 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{# The dependencies and the RACI rows: the same editable, sortable rows as the plan form's
|
||||
collections. Adding, removing and reordering is handled by Assets/js/plan.js through the
|
||||
plan-collection-* classes. #}
|
||||
{% macro dependency_row(dependency) %}
|
||||
<li class="plan-collection-row list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-xs-1 text-center">
|
||||
<span class="plan-collection-handle text-muted" title="{{ 'mautic.plan.task.dependency.drag'|trans }}" style="cursor: move;">
|
||||
<i class="ri-draggable ri-lg"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<div class="row">
|
||||
<div class="col-md-7">{{ form_row(dependency.dependsOn) }}</div>
|
||||
<div class="col-md-5">{{ form_row(dependency.dependencyType) }}</div>
|
||||
</div>
|
||||
{{ form_widget(dependency.position) }}
|
||||
</div>
|
||||
<div class="col-xs-1 text-right">
|
||||
<button type="button" class="btn btn-ghost btn-sm plan-collection-remove" title="{{ 'mautic.plan.task.dependency.remove'|trans }}">
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro raci_row(raci) %}
|
||||
<li class="plan-collection-row list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-xs-1 text-center">
|
||||
<span class="plan-collection-handle text-muted" title="{{ 'mautic.plan.task.raci.drag'|trans }}" style="cursor: move;">
|
||||
<i class="ri-draggable ri-lg"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<div class="row">
|
||||
<div class="col-md-4">{{ form_row(raci.role) }}</div>
|
||||
<div class="col-md-8">{{ form_row(raci.stakeholders) }}</div>
|
||||
</div>
|
||||
{{ form_widget(raci.position) }}
|
||||
</div>
|
||||
<div class="col-xs-1 text-right">
|
||||
<button type="button" class="btn btn-ghost btn-sm plan-collection-remove" title="{{ 'mautic.plan.task.raci.remove'|trans }}">
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_start(form) }}
|
||||
<div class="box-layout">
|
||||
@@ -28,18 +79,70 @@
|
||||
</div>
|
||||
</div>
|
||||
{{ form_row(form.description) }}
|
||||
{{ form_row(form.definitionOfDone) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 height-auto">
|
||||
<div class="pr-lg pl-lg pt-md pb-md">
|
||||
{{ form_row(form.status) }}
|
||||
{{ form_row(form.plan) }}
|
||||
{{ form_row(form.taskKind) }}
|
||||
{{ form_row(form.startDate) }}
|
||||
{{ form_row(form.endDate) }}
|
||||
{{ form_row(form.plan) }}
|
||||
{{ form_row(form.parent) }}
|
||||
<p class="text-muted small">{{ 'mautic.plan.task.parent.help'|trans }}</p>
|
||||
{% if form.status is defined %}
|
||||
{{ form_row(form.status) }}
|
||||
{% else %}
|
||||
{# A phase has no status of its own: its state comes from its tasks. #}
|
||||
<p class="text-muted small">{{ 'mautic.plan.task.kind.phase_status_note'|trans }}</p>
|
||||
{% endif %}
|
||||
{{ form_row(form.plannedWork) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
<div class="pa-md">
|
||||
<div class="col-md-12">
|
||||
{# Dependencies: several edges, each another task of the plan with the relation type. #}
|
||||
<div class="plan-collection plan-task-dependencies"
|
||||
data-prototype="{{ _self.dependency_row(form.dependencies.vars.prototype)|e('html_attr') }}"
|
||||
data-prototype-name="__dependency__">
|
||||
<h4 class="mt-lg mb-sm">{{ 'mautic.plan.task.field.dependencies'|trans }}</h4>
|
||||
{{ form_errors(form.dependencies) }}
|
||||
<p class="text-muted plan-collection-empty{% if form.dependencies|length > 0 %} hide{% endif %}">
|
||||
{{ 'mautic.plan.task.dependency.empty'|trans }}
|
||||
</p>
|
||||
<ul class="list-group plan-collection-list">
|
||||
{% for dependency in form.dependencies %}
|
||||
{{ _self.dependency_row(dependency) }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<button type="button" class="btn btn-ghost plan-collection-add">
|
||||
<i class="ri-add-line"></i> {{ 'mautic.plan.task.dependency.add'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
{% do form.dependencies.setRendered %}
|
||||
|
||||
{# RACI: one row per role, several stakeholders per role, picked from the plan's. #}
|
||||
<div class="plan-collection plan-task-raci"
|
||||
data-prototype="{{ _self.raci_row(form.raci.vars.prototype)|e('html_attr') }}"
|
||||
data-prototype-name="__raci__">
|
||||
<h4 class="mt-lg mb-sm">{{ 'mautic.plan.task.field.raci'|trans }}</h4>
|
||||
{{ form_errors(form.raci) }}
|
||||
<p class="text-muted plan-collection-empty{% if form.raci|length > 0 %} hide{% endif %}">
|
||||
{{ 'mautic.plan.task.raci.empty'|trans }}
|
||||
</p>
|
||||
<ul class="list-group plan-collection-list">
|
||||
{% for raci in form.raci %}
|
||||
{{ _self.raci_row(raci) }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<button type="button" class="btn btn-ghost plan-collection-add">
|
||||
<i class="ri-add-line"></i> {{ 'mautic.plan.task.raci.add'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
{% do form.raci.setRendered %}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_row(form.buttons) }}
|
||||
{# render_rest is false, so the hidden CSRF token must be rendered explicitly. #}
|
||||
{{ form_widget(form._token) }}
|
||||
{{ form_end(form, {'render_rest': false}) }}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user