Jira automation advanced branch on json list of issue keys

Dusan Spaic
Contributor
February 25, 2025


Hi, 

I have few questions and a issue with implementing my Jira Automation rule that should execute once per week (without jql), iterate on the list of issue keys returned from a web request (json) and for each key call Rovo Agent and post a Agent response as a comment to that issue.

Here is my Jira Automation:
Capture d’écran 2025-02-25 à 11.36.07.png
In my for each branch I iterate on a smart value 

{{webResponse.body.myAppResponse.createdTickets}}


and myAppResponse is

  "myAppResponse": {"createdTicketsKeys": [ "ECT-93", "ECT-94" ]}

 

Problem: in the audit log, I can see under the branch Log action: Processing Issue key ECT-93, Processing Issue key ECT-94
and then Use Rovo Agent -  Log action agent response: abc, agent response: def

This looks like each action individually is executed on my 2 issue keys: action1 executed 2 times, action 2 executed 2 times etc. 

I would like, similar to.js for-each iteration, to execute each declared action (calling Rovo agent and then adding comment) consequently on the first key and then execute those actions on the second issue key, etc. 

Not sure if this is just the way audit logs works (aggregate all audits in the same component or there is a real problem in the implementation).

In addition to this, my automation is not proceeding with adding comment to the issue (even if in audit logs I can see that the action executed). Looks like it's because action cannot get the context (which issue) should it add comment to since it cannot guess it from the issue key. It is not possible to add action to fetch issue.  I tried using lookup issue component with jql key = {{createdTicket.key}} but no success: error in audit logs mention that there is no issue in the context. 

 

Thanks for the help 

 

 

1 answer

1 accepted

2 votes
Answer accepted
Dusan Spaic
Contributor
February 26, 2025

After extensive investigation, I came to the following conclusions:

  • If your automation is not based on a scheduler using JQL and you need a scheduler to send web requests, you will not be able to get the issue in the automation context (component), even if you have its key
  • In this case, the only way I found to proceed is by calling another automation via a web request and including the issue keys in the body of that request. In the second automation, the incoming webhook can process those keys and have the corresponding issues in its context
  • The audit log component records everything that passes through it in a single audit log. So, if you have an iteration (branch) on 2 objects and with two audit logs inside this branch, you will first see the first audit log recording two objects, followed by the second audit log recording two objects. This is simply how the audit log works

 

Hope this helps someone struggling with a similar problem.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events