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:

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?