Forums

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

Jira Automation - Update multiple links in additional fields

David D_ April 29, 2025

Hello,

My issue is as follows.

I am writing a Jira Automated Rule that will create multiple "Task" tickets upon an Epic creation using a specific label. I have some intricate dependencies that are important in the end result. For the sake of an example, let's use the following diagram:

ticket-flow-example.png

My Jira automation rule works almost completely. If an Epic is created, it checks the label, if so it Creates Ticket 1. Then it creates a variable ticket1Var = {{createdIssue.key}}. Then it creates Ticket2. In Additional Fields of Ticket 2, I have: 

{"update": {
"issuelinks": [
{
"add": {
"type": {
"name": "Blocks"
},
"inwardIssue": {
"key": "{{ticket1Var}}"
}
}
}
]
}
}

It creates ticket2Var = {{createdIssue.key}}. It then creates Ticket3 and does the same.

Finally, it creates Ticket 4 but then I don't know what to do to have Ticket 4 blocked by Ticket 2 and Ticket 3.

I think I have tried everything I could.

So am wondering:

  • Can this be done with additional fields or not?
  • If it can't be done this way, can it be done by editing the issue in another action, if so how? I don't understand how I can edit a newly created issue via a Jira automation.
  • Anything else I can consider?

1 answer

2 votes
David D_ April 29, 2025

So I just figured out an alternate solution... (ecstatic!)

After Ticket 4 creation, I went ahead and created a Branch Rule for "Most recently created work item". Then I perform a new action "Edit work item fields" which will directly edit the work item related to that branch. 

I could not do "Edit work item fields" in the main branch because there is unfortunately no solution to select the Issue key that we want to Edit (not manually nor using smart values).

In the "Edit" action, I went ahead an modified the additional fields section to take into account the same JSON structure and add the inwardIssue link from "{{ticket3Var}}".

By doing this, I get the exact dependencies as I wanted in the Ticket diagram I shared. 

Suggest an answer

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

Atlassian Community Events