Hi guys,
I set up an automation and the trigger is "Transfer to development upon completion? Yes/No". If select Yes, it will create a new issue in development related project when the issue is complete.
And here is the problem I'm having, if I create a sub-issue and select "Yes" to trigger development issue creation, it fails and returns "Error creating issue: Issue type is a sub-task but parent issue key or id not specified. (issuetype)".
Because sometimes the task is big and we need to create sub-tickets to solve it, can someone teach me how to solve this problem?
Thank you in advance!
Hi @James Chen - Can you please share a screen shot of your rule?
Hi @Mark Segall , here is the rule.
When an issue is transitioned and matches the condition, then it will create a new issue in another project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your rule seems simple enough. In your rule details, have you verified that the scope is set for multiple projects or global? You mention that you're trying to create an issue in another project. This will fail if your rule scope is set to a single project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry just re-read this. You're trying to create a sub-task in another project. The challenge is that you need to have a parent issue as an anchor and need some way to query for that parent issue so you can create the sub-task under it. If you have business logic that you can use to identify the parent issue on the other project (e.g. link to the original task, label, anything else that can isolate it), you can use a Lookup Issues action to query for it and then use {{lookupIssues}} as the parent link for the sub-task you're trying to create.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Mark,
Actually I didn't want to create a sub-task in another project. What I want to do is when a subtask in project A is completed, it will automatically create a new task in project B. (not sub-task in B)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok - It's making sense. So, the problem with your rule is that under your create issue action, it is set to Same Issue Type. The fact that this is triggered by a sub-task means that it will try to create a sub-task on your destination project which fails because it has no specified parent. So, you need to change that field to the desired issue type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I changed the issue type to "Task" in my rule and it works! The sub-task finally can create a new task in another project. Really appreciate your time and suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Update: use the advanced function to try this:
{
"fields": {
"parent": {
"key": "{{issue.parent.key}}"
}
}
}
But it showed another error message:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi James,
I am wondering if you could use the advanced function to populate the parent key. Something like:
{
"fields": {
"{{issue.parent.key}}": {{triggerissue.parent.key}}
]
}
}
I have not tried this before - using a smart value for the field name.
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.
So all of these sibling sub-tasks have the same parent I assume. Is it possible that it is returning more than one project? Is this rule for a single project?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just saw the clarification below. So just change the Issue Type in being created to Story and get rid of this advanced code, and you should be good.
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.