mirror of
https://github.com/xtr-dev/payload-automation.git
synced 2025-12-10 00:43:23 +00:00
Add enhanced debugging for trigger matching
- Show detailed matching criteria for each trigger - Display typeMatch, collectionMatch, operationMatch for debugging - Help identify why triggers are not matching - Assists in troubleshooting workflow execution issues
This commit is contained in:
@@ -1035,11 +1035,18 @@ export class WorkflowExecutor {
|
|||||||
triggerCount: triggers?.length || 0,
|
triggerCount: triggers?.length || 0,
|
||||||
triggers: triggers?.map(t => ({
|
triggers: triggers?.map(t => ({
|
||||||
type: t.type,
|
type: t.type,
|
||||||
|
parameters: t.parameters,
|
||||||
collection: t.parameters?.collection,
|
collection: t.parameters?.collection,
|
||||||
collectionSlug: t.parameters?.collectionSlug,
|
collectionSlug: t.parameters?.collectionSlug,
|
||||||
operation: t.parameters?.operation
|
operation: t.parameters?.operation,
|
||||||
}))
|
// Debug matching criteria
|
||||||
}, 'Checking workflow triggers')
|
typeMatch: t.type === 'collection-trigger',
|
||||||
|
collectionMatch: (t.parameters?.collection === collection || t.parameters?.collectionSlug === collection),
|
||||||
|
operationMatch: t.parameters?.operation === operation
|
||||||
|
})),
|
||||||
|
targetCollection: collection,
|
||||||
|
targetOperation: operation
|
||||||
|
}, 'Checking workflow triggers with detailed matching info')
|
||||||
|
|
||||||
const matchingTriggers = triggers?.filter(trigger =>
|
const matchingTriggers = triggers?.filter(trigger =>
|
||||||
trigger.type === 'collection-trigger' &&
|
trigger.type === 'collection-trigger' &&
|
||||||
|
|||||||
Reference in New Issue
Block a user