Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Challenge with "deployment successful" Jira automation rule devops trigger

martin_kelly
July 16, 2026

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?

1 answer

1 accepted

1 vote
Answer accepted
martin_kelly
July 16, 2026

I think I have solved my own problem, so I'm sharing the solution here in case people find it useful.

  1. I've modified my lookup jql that gets all the work items in the successful deployment to return them in a predictable order: deploymentName ~ "{{deployment.name}}" order by key asc
  2. I've realised that I can access the key of first work item in the lookup with {{lookupIssues.first.key}}
  3. I can also access the key of the issue that is the trigger for each individual invocation of my automation rule with {{triggerIssue.key}}

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. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events