On Jira Cloud,
Using Project Automation, we can create predefined number of subtasks, when a issue tranistions from 1 state to another.
Is there way to create number of subtasks dynamically based on a value defined in any custom field?
Hello @Vishal Biyani
Thank you for reaching out.
Unfortunately, Jira automation does not have a rule to use the number filled in a custom field to determine how many times an action should be triggered. We have the following feature request created to implement this possibility:
Ability to repeat/loop on a brach for a given number of times
For now, the best you can do to achieve your need would be by creating conditions for each number you set, creating the equivalent number of sub-tasks. This is a good approach if your team does not need to create more than 10 or 15 sub-tasks automatically:
Let us know if you have any questions.
@Petter Gonçalves In continuation with this idea, i hit another road block
In order to update summary and description of sub-task, i created xml tags in Description field like below. i am not sure how to parse this.
Any way i can achieve this will be really helpful
<tag>
<summary>Summary 1</summary>
<description>This is description 1</summary>
</tag>
<tag>
<summary>Summary 2</summary>
<description>This is description 2</summary>
</tag>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Petter Gonçalves - You can ignore this. I have been able to implement this using chaining of smart values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishal,
I just came up with the exact same requirement like your post here: auto-create a defined number of subtasks based on their parent task custom field (number). I truly appreciate if you could share your approach using smart value.
Many thanks,
Thuy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The solution that i came up with may not be optimal. However, it served the purpose.
Jira Automation does not allow looping like we do in programming.
So assuming you want to create a predefined number of subtasks below can be done:
1. On an event trigger the rule. I used issue transition rule.
2. Populate variable using below rule
3. Then create the subtask, with summary and description like below
Summary: {{varCoding.split('~').get(0).substringBetween("<summary>", "</summary")}}
Description: {{varCoding.split('~').get(0).substringBetween("<description>", "</description")}}
Copying summary and description for n number of subtasks didn't make sense for my use case. if it works for you, then you can copy the summary and description from parent task as well.
Let me know if you have any question or suggestion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much indeed. I am really sorry for answering after a long time.
I get to know of "Create variable" using smart value, which is so useful for my other problem, but unfortunately not this one.
As I have quite a lot number of subtask (sometimes up tp 60-100) so the approach of Petter Gonçalves is not best efficient.
I came across this below solution:
Frankly, it is far more complicated for me, I will need more time to consume the idea.
You might have a look if you want to leverage your current solution.
Best wishes
Thuy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing the link. The idea looks interesting.
Will explore sometime later and see how this approach can serve the purpose
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.