Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Send notification to assignee if no sub-task is created (via Automation)

I have an issue and this issue has no due date, but some approval date. What I want to achieve via automation is to send notification to assignee, if there's no sub-task with due date after some time, for example one month, after approval of the parent issue. So that means, one month after issue approval, it should be there at least one sub-task with due date, if no due date notify the assignee of parent issue or if no sub-task the same notification should go to the parent issue assignee. How can I implement this workflow via Automation? 

1 answer

1 accepted

2 votes
Answer accepted

Hi @Lukas 

How are you determining "issue approval": status transition, a custom field, something else?

However you are doing that, you could write an automation rule with a scheduled trigger to check your various conditions and then send the notification.  I recommend mapping out this process better before you start; that will help you create the rule, knowing which conditions to test and on which issues to do so.

To get you started on creating your rule, please review this documentation and examples:

Kind regards,

@Bill Sheboy yes, the approval date should be filled before the status is transisioned, it's a condition. What I can't imagine is, how can I express the condition "at least one sub-task should be there after one month" in JQL :(

The smart value for an issue's subtasks is {{issue.subtasks}} and that is a list attribute.

And the size function can be used on that list to check how many subtasks are present.  I recommend adding a default value of zero to handle when there are none in your condition test.

Like Lukas likes this

@Bill Sheboy ok, that make sense, however I have couple of "custom" types of sub-tasks. So it should be there at least one sub-task from type of "Mitigation task". How can I take this condition into account?

In that case, I recommend using JQL to find the subtasks of the types you want to count, and with the same parent of your trigger issue, storing the results with a Lookup Issues action.  Then you can still use the size function to count how many are found.

Like Lukas likes this

@Bill Sheboymy JQL didn't work. But I have issue type "Mitigation task" as well. subtask type.PNG

And here is my JQL query:

jql query.PNG

Ok, I found it out, i have to use "" like, IssueType="Mitigation task". But still I couldn't figure it out, how I can use size function in this case.

Your JQL could be something like this in the rule:

project = myProjectName AND parent = {{triggerIssue.key}} AND issueType = "Mitigation task" AND statusCategory != Done

Try using that with the Lookup Issues action to return the issues.  Then check the size of the results: 


Like Lukas likes this

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events