Hi Experts!
I'm currently trying to create a rule using JIRA service management automation to create an N number of subtasks when an issue transitions from one state to another.
My problem is as follows:
Is there a way to create a number of subtasks dynamically based on a value defined in any custom field/variable?
Any help, advice, direction would be greatly appreciated please?
There isn't a simple way to do what you want. The only feature that Atlassian provides us with Jira Automation is to "branch" using a custom variable list. And this has to be a list!
With that said the only list I can think of and could do that trick for you is a multi select checkbox. In theory this should work:
It's not the best approach, but it's the only thing you've currently got. I would recommend getting an app like JMWE and do everything from there. Better :)
Thanks for the valuable feedback, I'll try out your workaround and hopefully revert with some results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not sure what the best way to do this would be/if it is possible. I took a look at a few different options to see what if anything can be done. In order to iterate a dynamic number of times, you would need to use the advanced branching. One thing you could try to do is find an API endpoint which returns a list of each business date between the start and end date custom fields. You could iterate over that response and tell if to create a new subtask for each business date returned. I haven't found an API like that, but one may exist that you could leverage.
You can get the total number of business days using this smart value - {{now.diff(issue.created).businessDays}}
, but that doesn't give you anything to iterate over.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is an open feature request to iterate a number of times based on a custom field, but that hasn't been picked up yet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the valuable feedback and details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Greetings Nuwanee,
I have recently released a Community Article specific to your issue, so I thought it'd be helpful to share it here.
How to create dynamic looping in Automation for Jira
I hope this helps.
Take Care,
Payden Pringle
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.