diff --git a/src/modules/manager/workflowTemplates/components/CapabilityEditors/TaskCoreEditor.tsx b/src/modules/manager/workflowTemplates/components/CapabilityEditors/TaskCoreEditor.tsx index 6c4d9c8..a600ebf 100644 --- a/src/modules/manager/workflowTemplates/components/CapabilityEditors/TaskCoreEditor.tsx +++ b/src/modules/manager/workflowTemplates/components/CapabilityEditors/TaskCoreEditor.tsx @@ -53,18 +53,6 @@ const formatNewTaskName = ( return `${base}${index}`; }; -const setDefaultPredecessors = ( - task: TaskDefinition, - tasks: TaskDefinition[], -): string[] => { - const allowedPredecessors = getAllowedPredecessors(task, tasks); - if (allowedPredecessors.length === 0) return []; - - return [ - allowedPredecessors[allowedPredecessors.length - 1].config.guid as string, - ]; -}; - export const TaskCoreEditor: React.FC = (props) => { const { task, tasks, onChange, fieldErrors } = props; @@ -97,22 +85,6 @@ export const TaskCoreEditor: React.FC = (props) => { InputType.time, fieldErrors, )} - {renderTaskField( - task, - onChange, - "predecessors", - "Predecessors", - InputType.checklist, - fieldErrors, - "", - 0, - { - options: allowedPredecessors.map((t) => ({ - value: t.config.guid as string, - label: t.config.name as string, - })), - }, - )} ); }; @@ -149,13 +121,6 @@ const runValidation = ( errors.predecessors = "A task cannot depend on itself."; } - if (task.config.predecessors) { - const unique = new Set(task.config.predecessors as string[]); - if (unique.size !== (task.config.predecessors as string[]).length) { - errors.predecessors = "Duplicate predecessors are not allowed."; - } - } - return Promise.resolve(errors); }; @@ -172,7 +137,6 @@ export function defaultsAssignment( ); task.config.description = ""; task.config.duration = "01:00"; - task.config.predecessors = setDefaultPredecessors(task, tasks); } export const taskCoreEditorRegistryEntry: capabilityEditorRegistryEntry = {