I have a Jira automation rule that uses the devops trigger "deployment successful". We frequently have instances where more than one Jira work item is associated with each deployment and, in such cases, my automation rule is triggered for each Jira work item in the deployment. This means that the actions in my automation rule can get repeated multiple times (once for each work item).
What I'd really like to do is only trigger the rule once per successful deployment and then carry out the actions for the work items as a single set. Something like this:
1). Rule triggered for first work item in successful deployment.
2). Use the deployment info to do a lookup to get all the work items in the successful deployment with jql like this: deploymentName ~ "{{deployment.name}}"
3). Loop over the list of work items from the lookup to carry out my actions.
I know how to get steps 2 and 3 to work but step 1 causes me a problem because I can't think of a way to stop the rule execute steps 2 and 3 for every work item after the first one in the successful deployment (even by using a condition on the trigger).
Does anybody have any suggestions for how to solve this?
I think I have solved my own problem, so I'm sharing the solution here in case people find it useful.
So that means I can do an IF... ELSE block:
If {{triggerIssue.key}} equals {{lookupIssues.first.key}} then do my actions
Else do nothing because its one of the other work items.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.