Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation: Creating subtasks based on components

Hi, 

Is there an option to prepare automation that allows me to create subtasks dependent on components (or other custom fields)?


Problem: 

I need to be able to prepare in the same time 2-6 clones of the same task/subtask based on a variable which allows me to assignee task to a direct team 


Example:

1. User creates a task 1
2. User chooses two components: Blue and Red. 
2. Automatically there should be created two sub-tasks (one for each component) 
3. Subtask 1 with component Blue
4. Subtask 2 with component Red
5. Title/Description are copied from a task 1

If I add more components there will be more sub-tasks automatically created. 


I would really appreciate Your help or ideas how I can set up sth like this. 

Best, 
M. 

1 answer

1 accepted

0 votes
Answer accepted
John Funk Community Leader May 24, 2021

Hi Maciej,

I would create an automation rule based on Issue Created trigger.

Then create a series of If / else block condition where it looks something like:

Use Issue Fields condition for the IF

If component = Blue

Then new action for Clone Issue with issue type of Sub-task

It would look like this:

screenshot.png

HI @Maciej Smogorzewski 

Adding on to what @John Funk suggests... At this time, there is no concept of dynamic looping in automation for Jira.  That means that when you create a new component value, you would need to modify your rule to handle the new value.

Best regards,

Bill

Like # people like this

@Bill Sheboy 

Ok, thanks a lot for information. Unfortunatley I will over 30 projects where I must have this flow. Tough case :) 

Like John Funk likes this
John Funk Community Leader May 31, 2021

You are welcome 😊

@John Funk 

It works pretty well, so thanks again a lot - the only change I had to make was to switch "equals to contains". 

But now I'm facing another problem. Sub-tasks cannot be linked with epics, so
So when I clone a task (which has an epic) and then Jira converts it into a sub-task I'm receiving an error.  

Of course there is no problem with automation when I use it for tasks without an epic or when I made clones as tasks. 

Do You have any idea what I can force jira to ignore "epic" during creating sub-tasks? 

Best, 
Maciej 





Like John Funk likes this

When you clone an issue in an automation rule, you may optionally set some of the fields.  Have you tried to clear the epic link as part of that action?

Like John Funk likes this

@Bill Sheboy 

Yes, there are two options.

#1 To set Epic from a direct issue. I thought I could try to copy Epic from a task where Epic Link is Empty, but there is no option like this. 

Jira1z2.png

 

#2 There is also an option to use JSON. I tried it and it didn't work. BUT I'm sure if my command is correct. 


jira2z2.JPG


 

I tried sth like this (I added only the part with epic, the rest of it was already there)

{
"update": {
"labels": [
{
"add": "cloned"
}
],
"issuelinks": [
{
"add": {
"type": {
"name": "Cloners"
},
"fields": {
"Epic link": null
}

 

Regards, 
Maciej

@Bill Sheboy  @John Funk 

Thank You again for Your help. 

I realized that my sub-tasks had the same screen scheme as tasks (where was Epic Link).
I associated sub-tasks with the different scheme without epic link and now it works perfectly.


Regards, 

Maciej 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

240 views 7 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you