Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira DC: How to create one subtask for each fix versions defined on the parent issue?

Murakami
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 26, 2022

Hello Jira-automation colleagues, 

 

We are using Jira DC 8.13.x version with automation for Jira. 
For each value in the Fix Version field, we want to create Sub task.

Unfortunately, Jira DC does not have the 'For:each' option, so we were trying to use list of numbers conditions as per https://confluence.atlassian.com/automation/using-conditional-logic-in-smart-values-1081351607.html, however without success. 

We tried to work with 2 rules:
Rule "1":
Trigger: When fixversion is updated, we copy these values to a custom field "tempversion".
Rule "2"  (it can be called by other rules):
Trigger: When "tempversion" is updated. It will:
  • create a sub-task with the first value of "tempversion"
{
"fields": {
"fixVersions": [ { "name": {{issue.tempversion.first.name.asJsonString}} } ]
}
} 
  • update "tempversion" field removing the first value.
{
    "fields": {
"tempversion" : [  {{#issue.tempversion}}{{^first}}{"name": "{{name}}"} {{^last}},{{/}}{{/}}{{/}}  ]
   }
}
It does work... but...  it is creating 2 sub-tasks for each version.
Any thoughts on this?

 

1 comment

Benoit February 15, 2022

Very simple as I can see. when you empty the value, it triggers the task again since you request is to be run by another rule.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events