Scheduled task with sub-tasks
Asked by Ramaka (bnd):

Hello everyone,

I am new to the topic of automation. Actually, it doesn't look difficult, but I'm doing something wrong with the topic of creating a main task with 2 or x sub-tasks. But unfortunately I can't figure it out. Who can tell me what I'm doing wrong? A simple task that is created every Friday works.

![ScheduleTaskWithTwoSubTask.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/184190i7052A8710747A279/image-size/large?v=v2&px=999 "ScheduleTaskWithTwoSubTask.PNG")![ScheduleTaskWithTwoSubTask_2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/184192i6EF4110E24CEC7AD/image-size/large?v=v2&px=999 "ScheduleTaskWithTwoSubTask_2.PNG")


Answers:
author: Stefan Salzl
body: First of all: welcome in the community ;)

Which of the rules from the 2 screenshots does work?

From the first screenshot the first action (create issue "task") says it?s created in the same project. The last action (create subtask) then shows a specific project. So my questions are:

* What is the 2nd action processing (create 2 subtasks)?
* What should the last action process (create subtask in specific project)?

Could you please add screenshots showing the configuration of these 2 actions?

Best  
Stefan

comments: author: Stefan Salzl
body: furthermore:

The 2nd screenshot starts with a scheduled trigger and immediatly branches for "current issue". As there is no specific issue that is initiated with the trigger the branch cannot rely on any "current issue".

Please check and/or send a screenshot of the audit log (of an activation of this rule).

Best  
Stefan


author: Ramaka (bnd)
body: Hello Stefan, thanks that you spent your time on my issue.

To your questions: Neither of the two tasks works.

I switch everything to English and runs the process once more. That the workflow:

![ScheduleTaskWithTwoSubTask_3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/185246i9899E281D11C0F1F/image-size/large?v=v2&px=999 "ScheduleTaskWithTwoSubTask_3.PNG")

and this the audit-log.![ScheduleTaskWithTwoSubTask_4.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/185247i6AF238A45682984E/image-size/large?v=v2&px=999 "ScheduleTaskWithTwoSubTask_4.PNG")

Best Regards


author: Stefan Salzl
body: Hi

the branch "for subtasks" would refer to the subtasks of an issue. As the task was just created there are no subtask to "grab" for the branch.

In order to create subtasks for the lately created issue use the branch "recently created issue". This would set the previously created issue in the context of "current issue" and the "create subtask" action will then be processed for this this issue. (created a screenshot of how this could look like)

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/185257i7EEA1DB9A385AD5D/image-size/large?v=v2&px=999 "image.png")


author: Ramaka (bnd)
body: unfortunately, this way does not work either and the message with JQL is not yet understandable for me.  
![ScheduleTaskWithTwoSubTask_5.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/185254i6EA038393F7A80D6/image-size/large?v=v2&px=999 "ScheduleTaskWithTwoSubTask_5.PNG")


author: Ramaka (bnd)
body: Hi Stefan, That was the magic trick: "recently created process". - It works. - As suspected, if you know how to do it, it's totally easy. I have a hard time interpreting the terms and always wonder what the author means. Even in my mother tongue I didn't understand, because then the translation is probably not optimal. Thanks Ramaka


author: Stefan Salzl
body: see my previous answer. An automation rule/action always refers to a context (you can see it like a variable) named *issue* (that reaction then can refer to).

When a rule is triggered by an issue the {{issue}} is automatically set and handed over to the automation rule (this can then also be used in smart values to get information of the issue like {{issue.key}} for further processing). In this case the rule has a scheduled trigger (not an issue) therefore the system cannot set {{issue}} to a specific value as there is nothing handed over on the trigger.

Hope this explanation helps and I could explain it in an understandable way :)

Best  
Stefan


author: Ramaka (bnd)
body: Thanks for the explanations, I haven't quite got to the bottom of it yet. But the door is slowly opening, the first foot has reached the new world of automation and I am beginning to understand more, including where my thought error lay.

Best Ramaka


Tags: schedule

sub-task

task