diff --git a/app/scripts/modules/core/src/pipeline/manualExecution/ManualPipelineExecutionModal.tsx b/app/scripts/modules/core/src/pipeline/manualExecution/ManualPipelineExecutionModal.tsx index c9815a23faa..39706eb73d1 100644 --- a/app/scripts/modules/core/src/pipeline/manualExecution/ManualPipelineExecutionModal.tsx +++ b/app/scripts/modules/core/src/pipeline/manualExecution/ManualPipelineExecutionModal.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { Formik, Form } from 'formik'; import { Modal } from 'react-bootstrap'; import { Observable, Subject } from 'rxjs'; -import { assign, clone, compact, extend, get, head, uniq, isArray } from 'lodash'; +import { assign, clone, compact, extend, get, head, uniq, isArray, pickBy } from 'lodash'; import { SubmitButton, ModalClose } from 'core/modal'; import { Application } from 'core/application'; @@ -54,6 +54,8 @@ export interface IManualExecutionModalState { triggers: ITrigger[]; } +const TRIGGER_FIELDS_TO_EXCLUDE = ['correlationId', 'eventId', 'executionId']; + export class ManualExecutionModal extends React.Component { private formikRef = React.createRef>(); private destroy$ = new Subject(); @@ -256,7 +258,10 @@ export class ManualExecutionModal extends React.Component !TRIGGER_FIELDS_TO_EXCLUDE.includes(key)); + if (trigger.type === 'manual' && triggers.length) { trigger.type = head(triggers).type; }