Forums

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

Jira Automation-Create 'N' sub-tasks

Rishi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 5, 2023

Hello Experts,

We have a recurring activity happening every month. So we create Stories and Sub-Tasks to track those actions. I am currently trying to configure a rule, which should create 'N' sub-tasks under a story. The 'N' dynamically keeps varying.

There are stories where I have only 3sub-tasks under a story and the Automation should create the Story and 3sub-tasks. Likewise, sub-tasks keep changing 4,5. (below 8). Is there a way to configure the rule such that I don't need to hardcode the sub-task creation 'N' times.

I am looking for options in Jira Data center. Thanks in Advance!!

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2023

Hi @Rishi -- Welcome to the Atlassian Community!

Yes, there are at least two ways to do this: counter with advanced branch, and a web request.

First thing: how is the number of subtasks to create determined?

Let's assume you have a custom number field with the value.  That could use the rightPad() function to create a string of values, split them, and then use an advanced branch to iterate, adding the sub-tasks one by one.  There is a variation of that technique if you need the number whilst creating the issue (e.g., 5)

The other method is to set up some callbacks using web requests.  That requires multiple rules and seeing success / failures takes more effort.

Here are some earlier posts describing both methods:

  1. advanced branch: https://community.atlassian.com/t5/Jira-Software-questions/how-to-use-jira-automation-to-create-multiple-issues-based-on-a/qaq-p/2443240
  2. web request: https://community.atlassian.com/t5/Jira-Service-Management-articles/How-to-create-dynamic-looping-in-Automation-for-Jira/ba-p/2293077

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events