The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix manual trigger variables + workflow not found in sentry (#14509)
Thomas Trompette2f1efa68ad20
diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isOpenStepOutputSchema.ts b/packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isOpenStepOutputSchema.tsindex 7afb0ccd06f..f30332449e7 100644--- a/packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isOpenStepOutputSchema.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isOpenStepOutputSchema.ts@@ -9,14 +9,14 @@ import { isCodeOutputSchema } from './isCodeOutputSchema';import { isDatabaseEventTriggerOutputSchema } from './isDatabaseEventTriggerOutputSchema';import { isFindRecordsOutputSchema } from './isFindRecordsOutputSchema';import { isFormOutputSchema } from './isFormOutputSchema';-import { isRecordActionOutputSchema } from './isRecordActionOutputSchema';+import { isRecordStepOutputSchema } from './isRecordStepOutputSchema';export const isOpenStepOutputSchema = (stepType: WorkflowActionType | WorkflowTriggerType,schema: OutputSchemaV2,): schema is OpenStepOutputSchema => {return (- !isRecordActionOutputSchema(stepType, schema) &&+ !isRecordStepOutputSchema(stepType, schema) &&!isDatabaseEventTriggerOutputSchema(stepType, schema) &&!isFindRecordsOutputSchema(stepType, schema) &&!isFormOutputSchema(stepType, schema) &&diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isRecordActionOutputSchema.ts b/packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isRecordStepOutputSchema.tssimilarity index 69%rename from packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isRecordActionOutputSchema.tsrename to packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isRecordStepOutputSchema.tsindex 66aed4af171..31e39b2bb17 100644--- a/packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isRecordActionOutputSchema.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/types/guards/isRecordStepOutputSchema.ts@@ -5,11 +5,16 @@ import {import { type RecordActionOutputSchema } from '@/workflow/workflow-variables/types/RecordActionOutputSchema';import { type OutputSchemaV2 } from '@/workflow/workflow-variables/types/StepOutputSchemaV2';-const RECORD_ACTION_TYPES = ['CREATE_RECORD', 'UPDATE_RECORD', 'DELETE_RECORD'];+const RECORD_STEP_TYPES = [+ 'CREATE_RECORD',+ 'UPDATE_RECORD',+ 'DELETE_RECORD',+ 'MANUAL',+];-export const isRecordActionOutputSchema = (+export const isRecordStepOutputSchema = (stepType: WorkflowActionType | WorkflowTriggerType,schema: OutputSchemaV2,): schema is RecordActionOutputSchema => {- return RECORD_ACTION_TYPES.includes(stepType);+ return RECORD_STEP_TYPES.includes(stepType);};diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/utils/searchVariableThroughOutputSchemaV2.ts b/packages/twenty-front/src/modules/workflow/workflow-variables/utils/searchVariableThroughOutputSchemaV2.tsindex 2eca82a3017..c20d303dba0 100644--- a/packages/twenty-front/src/modules/workflow/workflow-variables/utils/searchVariableThroughOutputSchemaV2.ts+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/utils/searchVariableThroughOutputSchemaV2.ts@@ -6,7 +6,7 @@ import { isCodeOutputSchema } from '@/workflow/workflow-variables/types/guards/iimport { isDatabaseEventTriggerOutputSchema } from '@/workflow/workflow-variables/types/guards/isDatabaseEventTriggerOutputSchema';import { isFindRecordsOutputSchema } from '@/workflow/workflow-variables/types/guards/isFindRecordsOutputSchema';import { isFormOutputSchema } from '@/workflow/workflow-variables/types/guards/isFormOutputSchema';-import { isRecordActionOutputSchema } from '@/workflow/workflow-variables/types/guards/isRecordActionOutputSchema';+import { isRecordStepOutputSchema } from '@/workflow/workflow-variables/types/guards/isRecordStepOutputSchema';import { type StepOutputSchemaV2 } from '@/workflow/workflow-variables/types/StepOutputSchemaV2';import { searchVariableThroughBaseOutputSchema } from '@/workflow/workflow-variables/utils/searchVariableThroughBaseOutputSchema';@@ -27,7 +27,7 @@ export const searchVariableThroughOutputSchemaV2 = ({rawVariableName: string;isFullRecord: boolean;}) => {- if (isRecordActionOutputSchema(stepType, stepOutputSchema.outputSchema)) {+ if (isRecordStepOutputSchema(stepType, stepOutputSchema.outputSchema)) {return searchVariableThroughRecordOutputSchema({stepName: stepOutputSchema.name,recordOutputSchema: stepOutputSchema.outputSchema,diff --git a/packages/twenty-server/src/modules/workflow/workflow-status/jobs/workflow-statuses-update.job.ts b/packages/twenty-server/src/modules/workflow/workflow-status/jobs/workflow-statuses-update.job.tsindex 30105a6a1b6..07a05a42e12 100644--- a/packages/twenty-server/src/modules/workflow/workflow-status/jobs/workflow-statuses-update.job.ts+++ b/packages/twenty-server/src/modules/workflow/workflow-status/jobs/workflow-statuses-update.job.ts@@ -128,6 +128,7 @@ export class WorkflowStatusesUpdateJob {where: {id: workflowId,},+ withDeleted: true,});if (isEqual(newWorkflowStatuses, previousWorkflow.statuses)) {