From b7b40c400b61b97acc032eedb42d8e244b9bd601 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Mon, 8 Sep 2025 20:35:42 +0200 Subject: [PATCH] Fix duplicate field name issue by prefixing custom trigger fields - Prefix custom trigger field names with trigger slug to avoid conflicts - Built-in fields use __builtin_ prefix - Custom trigger fields use ___ prefix - Prevents naming collisions between different trigger types --- src/collections/Workflow.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/collections/Workflow.ts b/src/collections/Workflow.ts index d23116b..e5565d0 100644 --- a/src/collections/Workflow.ts +++ b/src/collections/Workflow.ts @@ -298,6 +298,8 @@ export const createWorkflowCollection: (options: WorkflowsPlug // Virtual fields for custom triggers ...(triggers || []).flatMap(t => (t.inputs || []).filter(f => 'name' in f && f.name).map(f => ({ ...f, + // Prefix field name with trigger slug to avoid conflicts + name: `__${t.slug}_${(f as any).name}`, admin: { ...(f.admin || {}), condition: (...args) => args[1]?.type === t.slug && (