Trying to create an Automation reminding assignees that there are subtasks and tasks due in 5 days

LJ April 4, 2023

Hi everyone!

I'm currently attempting to create a global automation for a service project and a business project that reminds assignees that they have subtasks/tasks due in 5 days from the due date.

I currently have the following JQL:

Screenshot 2023-04-05 at 2.54.01 pm.png

but am getting the attached error: 

Screenshot 2023-04-05 at 2.55.01 pm.png

 

I'm fairly new to Jira so any assistance would be really appreciated :) Thank you!

4 answers

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 5, 2023

Hi @LJ 

Yes, and...to the other answers posted:

You do not show the details of your scheduled trigger, so I am assuming it does not have JQL as you are also using Lookup Issues.

But, your Send Email action references {{issue}} fields, which do not exist.  When you use Lookup Issues, you instead reference the {{lookupIssues}} smart value, either as a set or individually by iterating over them.  Please look here for more information about using Lookup Issues: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues

Kind regards,
Bill

0 votes
Michael Fedulov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 23, 2023

Hi @LJ

We have recently added a template that could help you solve this issue: https://www.atlassian.com/software/jira/automation-template-library#/rule/9918938

Hope it helps and please let us know if it worked for you! 

0 votes
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 7, 2023

Hi @LJ,

It might be a simpler approach to use a filter subscription for this instead of an automation.

To do so, just navigate to Filters > Advanced issue search and update your filter to:

Project in (DLOG, DIG) AND issuetype = sub-task AND duedate >= startOfDay(5d)
AND duedate <= endOfDay (5d) AND assignee = currentUser()

Save the filter and create a subscription to a group of users that includes your assignees. They will receive a list of their assigned issues if there are any. 

Hope this helps!

LJ April 10, 2023

Hi Walter,

Thanks for your help! Would I add the assignees into this part of the JQL?

AND assignee = currentUser()'

 Thanks!

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 2023

Hi @LJ and welcome to the community,

If you click on "validate query" on your lookupIssues component, what does it return? If the answer is 0, then you have to place most likely and IF statement before sending the email and check that {{lookupIssues.size}} > 0.

In this case the email will be sent out, only if the lookupIssues yields at least one issue.

LJ April 5, 2023

Hi @Alex Koxaras _Relational_ , Thank you! :)

I am getting 1 issue found when I validate - would this option still apply? Thank you!

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 2023

Ok! Is this issue assigned?

LJ April 5, 2023

Yes, it is assigned to me, however it is a subtask. The child issue and epic it sits under do not have assignees - do these need assignees in order for the email to send?  We use epics as our 'Projects' and will only add assignees to subtasks and sometimes child issues. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 2023

You can't notify assignees that are not there!

I think you need to revise the selection criteria if the issues are not assigned.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 2023

Just like Nic said, you can't send an email to an unassigned issue. So if the parent has an assignee, then it's best to add a branch for the parent and send an email to the assignee of the parent issue.

LJ April 6, 2023

Ok thank you for your help :) So all epics must have assignees in order for this to work, is that correct?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 6, 2023

For this particular one to work, yes, because you've said "send to assignee".  No assignee, no mail can be sent to them.

You could modify it to send to someone else other than the assignee.

Like LJ likes this

Suggest an answer

Log in or Sign up to answer