Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,556,463
Community Members
 
Community Events
184
Community Groups

Automation Send Email When Task is Near Due

Hello Team, I am using the canned automation to send emails with stories are near 3 days from the due date.  Works.

 

I want to modify this to only send emails for stories that are Priority = High or Highest.

 

Do I modify this and if so how, what variables.  Thank you.  You are awesome.

duedate <= endOfDay({{numberOfDaysBeforeDueInclusion}}) AND statusCategory != done AND assignee = {{distinctAssignee}}

2 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 21, 2023

Hello @Cyril James 

Whenever asking for help with an Automation Rule, please show us the rule that you have. Often the advice we give depends on the construction of the rule since there are many different ways to accomplish tasks with automation.

If this relates to your other post...

https://community.atlassian.com/t5/Jira-Software-questions/Automation-When-a-task-is-near-due-send-email-reminder/qaq-p/2338384

...and you are using the rule template mentioned by Stephen Wrathall, then you will have to change the JQL in the Lookup Issues actions.

Screen Shot 2023-04-21 at 1.59.08 PM.png

I recommend changing both in the same way.

Add the clause

AND Priority in (High, Highest)

 

You can learn more about constructing JQL queries from the documentation located here.

Thank you @Trudy Claspill 

 

Does this look correct to only send email notifications for Priority = High or Highest.

 

duedate <= endOfDay({{numberOfDaysBeforeDueInclusion}}) AND statusCategory != done AND assignee = {{distinctAssignee}} AND Priority in (High, Highest)

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 24, 2023

Yes, it does look correct.

ok, I was worried.  There are no {{}} 

 

:-)

I wish you could test this.  There looks to be an option to test the query but its greyed out for me

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 24, 2023

The curly braces {{}} are used in JQL in automation only when you are inserting into the JQL a variable or a specific issue's field value that is known within the Automation. For the criteria and Priority in (High, Highest) there are no variables or references to values in specific issues so there is no need for curly braces.

The option to test the query is greyed out because of the use of variables.

You could test the filter in the Advanced Issue Search screen by substituting actual values where you have variables; i.e.

duedate <= endOfDay(<actual number>) AND statusCategory != done AND assignee = <actual assignee> AND Priority in (High, Highest)

Thank you Trudy.  You are such a star in the community!

Like Trudy Claspill likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 24, 2023

Thank you, Cyril.

If your question has been answered adequately, please consider marking the Answer as Accepted to help other users find posts with validated answers.

I tried this to add Priority High and Highest and it is not working exactly as planned.  

The automation runs and sends out the emails, yes.  Problem, if there are no High priority issues, the email still gets sent and its blank.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 27, 2023

After the Lookup Issues action you can add a Condition / Advanced Compare to check that the number of issues returned is greater than zero. This smart value gives you the number of issues returned by the last Lookup action:

{{lookupIssues.size}}

0 votes
Clark Everson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 21, 2023

Hi Cyril,

when you say automation you mean automation for jira right?

 

if so no need to change your jql just add a condition by field and do priority and choose the ones you want 

best,

clark

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events