Hi,
i'm trying to create a task and its subtasks using jira automation additional fields options
here is the JSON i used:
{
"fields": {
"summary": "{{issue.summary}}",
"subtasks":
[
{
"transition": {
"id": "221"
},
"fields": {
"summary": "{{issue.summary}} runset",
"issuetype": {"name": "Sub-task"},
"parent": {"key": "{{issue.key}}"}
}
},
{
"transition": {
"id": "221"
},
"fields": {
"summary": "{{issue.summary}} test case",
"issuetype": {"name": "Sub-task"},
"parent": {"key": "{{issue.key}}"}
}
}
]
}
}
i'm getting
Hello Yohai,
Allow me to answer your question here to help others as well. :)
The Additional Fields section is used to edit fields using JSON and not to create new issues. Usually, you can add a Branch immediately following the Create Task action. This branch can operate on the most recently created issue, and you can create sub-tasks there.
If you are already creating the tasks/subtasks inside a branch, you can't create a sub-branch. As a suggestion to create subtasks without changing the rule flow. You can save the parent task issue key in a variable and use this variable to update the parent field in the subtask. This way, the subtask will be created under the newly created task.
Here's a screenshot to illustrate this suggestion:
Thanks & Regards,
Hala ElRoumy
Atlassian Cloud Support
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.