-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Forge - Jira Workflow Modules
-
None
This topic was brought up on RFC-146.
Providing an optional conditional trigger to Forge workflow post functions would give applications a way control whether a post function will trigger. This could provide efficiency gains for apps and reduce their need to perform complex processing or calls out to other services in cases where they do not need to be run.
For example adding a `triggerCondition.expression` could be added in the module definition so the function only runs the function if the the 'some-key' properties is set in issue properties.
e.g.
modules:
jira:workflowPostFunction:
- key: my-forge-workflow-post-function
name: Jira workflow post function example
function: my-postfunction
projectTypes: ['company-managed', 'team-managed']
triggerCondition:
expression: "issue.properties['some-key'] != null"
...
...
function:
- key: my-postfunction
handler: index.postfunction