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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,693
Community Members
 
Community Events
184
Community Groups

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

I Murakami
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 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

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