I have what I thought would be a simple automation, but it's causing me huge headaches.
I trigger the creation of multiple tasks based on a transition. This all works nicely and my tasks are created without any issue. However, I want to extend this so that some of the tasks also have sub-tasks. For example, one task is for the maths on the project. The maths are split into development maths and final maths, both of which are sub-tasks under Maths.
The sub-tasks fail with "You can't add sub-tasks to epics. Sub-tasks are automatically associated with the same epic as their parent issues."
I originally tried this in a linear format with the sub-task created next and the Parent issue set to the variable created after the Task. The audit log is displaying this as the correct issue.
This was producing the error, so I changed it to branch after writing to the audit.
First with the branch defined as most recently created issue (i.e. the MathsTask). This still produced the same error, so I've changed it to branch on JQL of key = {{MathsTask}} but it still gives the error. After creating the branch, I have changed Parent issue for the sub-task to be {{MathsTask}} and Current Issue, although both still return the same error.
I have added an audit log immediately inside the branch that correctly writes the same MathsTask key using Branch Task is {{key}}.
I'm sure this is something simple. Can anyone help?
Hi @Tim Foster ,
I cannot really read out the real function use case. Could you please provide a step by step description from a user/functional perspective ("given - when - then/and", describing what should happen when/under which conditions)? this would make it easier to find a target-aimed solution. In addition could you please also provide a screenshot of the whole automation rule as well as from audit log for deeper analyze?
Thanks in advance.
Best
Stefan
Hi Stefan,
I can provide the functional perspective, but as the automation creates around 20-30 tasks it's hard to put in to screenshots.
Functionally, it should trigger when an Epic transitions from planning to planned.
The problem is that whether it's linear (as above), or branched at the point of T2 and T3 being created, the sub-tasks fail
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now as trying to build this I realized there is the "create issue" in your rule with setting the parent. This case is meant to set an Epic as parent for issues on (main) issue level. A subtask cannot be created standalone and then connected to a parent.
There is a seperate action "create subtask" for this so you wouldn´t even need to story the issue in a variable. With this action you could process linear or add a "recently created issue" branch if you´d like to have a more structured view of your rule components.
Hope this helps.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had seen that option, but since I want to add additional fields (component, estimated time etc) it reverts to adding them in the same way as Create Task and selecting the type as sub-task.
I tried just creating them as bare bones with just a summary as per your screenshot, but this creating them as sub-tasks of the Epic not the Maths task that I had created in the step before.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure. I´m sorry. My bad. As the epic is your trigger issue the subtask are created in the epic 🙈 And I wasn´t aware of that the subtasks are then created with "create issue" if other fields need to be added :)
Please try the following settings:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup, that brings me back to where I started though :) I have tried most recently created issue and using JQL to define the correct task
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
could you please show what happens right before the branch? I can´t see which issue was created. Was there a creation of a task?
Please also show the settings of the subtask creation. Did you choose "current issue" as parent?
If there was a task (lets say Task A) created right before the "recently created issue" branch the focus/current issue within the branch changes to Task A. therefore all following actions should refer to this issue.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup, right before the branch it creates the task that should be the parent for the sub-tasks
The audit log inside the branch is writing the correct key, i.e. from the task created before the variable. I tried removing the variable, in case that was interfering, but got the same problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
guess we got it now:
standard issues are linked to epics but this is a subtask. Add the epic link in the creation of the task so the standard issues (task which is the parent) is linked in the epic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You sir, are a genius!
Thank you for this. I hadn't even considered that. I've got so used to doing that for the tasks it never even crossed my mind.
Nice of Atlassian to provide a helpful error message :)
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. It´s my pleasure 😉💪 Really happy we got that to work.
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.