diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index 9b7b567525..c76ef141d9 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -839,6 +839,7 @@ export type IssueLinkInput = { export type JiraConfig = { __typename?: "JiraConfig"; + email?: Maybe; host?: Maybe; }; @@ -4860,6 +4861,7 @@ export type RestartTaskMutation = { __typename?: "Task"; execution: number; latestExecution: number; + priority?: number | null; buildVariant: string; buildVariantDisplayName?: string | null; displayName: string; diff --git a/src/gql/mutations/restart-task.graphql b/src/gql/mutations/restart-task.graphql index d17153852b..acbfab9355 100644 --- a/src/gql/mutations/restart-task.graphql +++ b/src/gql/mutations/restart-task.graphql @@ -4,5 +4,6 @@ mutation RestartTask($taskId: String!, $failedOnly: Boolean!) { ...BaseTask execution latestExecution + priority } } diff --git a/src/pages/task/ActionButtons.tsx b/src/pages/task/ActionButtons.tsx index 9a36f7c1a5..4c657b6970 100644 --- a/src/pages/task/ActionButtons.tsx +++ b/src/pages/task/ActionButtons.tsx @@ -129,8 +129,14 @@ export const ActionButtons: React.FC = ({ RestartTaskMutationVariables >(RESTART_TASK, { onCompleted: (data) => { - const { latestExecution } = data.restartTask; - dispatchToast.success("Task scheduled to restart"); + const { latestExecution, priority } = data.restartTask; + if (priority < 0) { + dispatchToast.warning( + "Task scheduled to restart, but is disabled. Enable the task to run." + ); + } else { + dispatchToast.success("Task scheduled to restart"); + } setExecution(latestExecution); }, onError: (err) => {