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
+37
-1
@@ -10,7 +10,11 @@
|
||||
* because that page isn't a "plan" page).
|
||||
*/
|
||||
Mautic.planTaskOnLoad = function (container) {
|
||||
// The task form isn't a plan-collection; the type dropdown works the same way as in the plan form.
|
||||
// The dependencies and RACI rows work like the plan form's collections.
|
||||
mQuery(container).find('.plan-collection').each(function () {
|
||||
Mautic.planInitCollection(mQuery(this));
|
||||
});
|
||||
// The type dropdown works the same way as in the plan form.
|
||||
mQuery(container).find('select.plan-item-type').each(function () {
|
||||
var $select = mQuery(this);
|
||||
|
||||
@@ -26,6 +30,38 @@ Mautic.planTaskOnLoad = function (container) {
|
||||
$scope.find('.plan-item-type-icon').first().attr('class', 'plan-item-type-icon ' + ($option.attr('data-icon') || ''));
|
||||
});
|
||||
});
|
||||
|
||||
// Kind rules: a milestone's end date is enslaved to its start date (copied and read-only);
|
||||
// a phase has no status of its own (the field is left out server-side, nothing to do here).
|
||||
mQuery(container).find('select[name$="[taskKind]"]').each(function () {
|
||||
var $kind = mQuery(this);
|
||||
|
||||
if ($kind.data('planKindInitialized')) {
|
||||
return;
|
||||
}
|
||||
$kind.data('planKindInitialized', true);
|
||||
|
||||
var enslave = function () {
|
||||
var $form = mQuery(this).closest('form');
|
||||
var $start = $form.find('input[name$="[startDate]"]').first();
|
||||
var $end = $form.find('input[name$="[endDate]"]').first();
|
||||
var milestone = 'milestone' === mQuery(this).val();
|
||||
|
||||
$end.prop('disabled', milestone);
|
||||
if (milestone) {
|
||||
$end.val($start.val());
|
||||
// While the milestone is selected, the end follows the start.
|
||||
$start.off('change.planKind').on('change.planKind', function () {
|
||||
$end.val($start.val());
|
||||
});
|
||||
} else {
|
||||
$start.off('change.planKind');
|
||||
}
|
||||
};
|
||||
|
||||
$kind.on('change', enslave);
|
||||
enslave.call($kind.get(0));
|
||||
});
|
||||
};
|
||||
Mautic.planOnLoad = function (container) {
|
||||
mQuery(container).find('.plan-collection').each(function () {
|
||||
|
||||
Reference in new issue
Block a user