Forums

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

How do I automate a rule to create a user story containing sub tasks

Owen Edwards May 13, 2022

I want to be able to automate a rule that will create a user story every month called Release that will also contain 11 sub tasks. 

I can schedule a user story to be created every month but i cant link the creation of sub tasks to that user story. I don't know how to use JQL (I've removed my project name from the screenshot)

Example rule.png

2 answers

1 accepted

2 votes
Answer accepted
John Funk
Community Champion
May 13, 2022

Hi Owen - Welcome to the Atlassian Community!

This should do the trick for you. Just keep adding your sub-tasks until you get all 11 in. The branch will cause the sub-tasks to automatically be attached to the parent. 

screenshot.png

Owen Edwards May 13, 2022

This didnt work for me it creates the story ticket but cant create the sub tasks:

Issues created successfully
LC-1247
Can't branch rule as it requires issue(s) in the context for this option. More than likely you have a trigger that doesn't insert issues into the rule chain. e.g. Scheduled rule not running a JQL query. Creating an issue does not put an issue into the context, you have to branch on it directly.
John Funk
Community Champion
May 13, 2022

Can you post your latest rule?

Owen Edwards May 13, 2022

There was an issue with my server so rules weren't running. I've tried it again and this method works when i try the rule out, thanks very much for your help

Like Yash Raj likes this
John Funk
Community Champion
May 13, 2022

Great! Glad this is working for you. 

Like Yash Raj likes this
0 votes
Yash Raj
Contributor
May 13, 2022

Hi @Owen Edwards 

so as i can understand 

you want to create a link to the story from the below Subtask

correct me if am wrong

then you can "add a field "Linked issues" in the below subtask automation

and select before or after which you want and 

Copy paste this smart value to link the issue {{createdissue.get(0).key}}

i hope this works

Owen Edwards May 13, 2022

I want to automatically create a story ticket that has 11 sub tasks every month.  I dont want to link tasks to it i want them nested within the user story like sub tasks do.  When i tried adding the linked issue to the sub task step i selected "relates to" and only have the option to select "trigger issue", i dont have the option to insert{{createdissue.get(0).key}} anywhere.

Owen Edwards May 13, 2022

The user story is created but not the sub tasks:

Issues created successfully:
LC-1248

Error creating issue:

Issue type is a sub-task but parent issue key or id not specified. (issuetype)

Yash Raj
Contributor
May 13, 2022

if am not wrong 

Is this how you want to implement,, 

a Story and below Subtasks 

Story.PNG

Suggest an answer

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

Atlassian Community Events