Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Only Send email notifications when there are task with due date is approaching

Karl Jackson November 8, 2022

I'd like to only have the email notification sent when there are tasks. As is, when there are no tasks, the email just sends the template with no tasks. 

 

("target end" > startOfDay(-5) and status != done and "target end" <= endOfDay() and status != done OR "target end" < -5d and status != done)

Screenshot 2022-11-08 101426.png

I've seen this thread, but this is not what I need.

 

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2022

Hi @Karl Jackson - I would recommend this:

  1. Remove the JQL from your trigger.
  2. Add a Branch based upon your JQL
  3. Move your send email action into the branch

If no issues are found, there will be nothing to branch against and no email will be sent.

Karl Jackson November 8, 2022

Thanks...One additional question, how do I get more than one to show within the same email, instead of separately? It's not set up to send all to the project lead, not the individual assigned to the issue.

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2022

Ahh for this you'll need to do something else:

  • TRIGGER: Scheduled (No JQL)
  • ACTION: Lookup Issues
    • Your Query
  • CONDITION (Advanced)
    • {{lookupIssues.size}}
      Greater Than
      0
  • ACTION: Send Email - You'll want something like this in your email body which will provide a bulleted list of the results with the key hyperlinked:
    • {{#lookupIssues}}
      <ul>
      <li><a href="{{url}}>{{key}}</a> - {{summary}}</li>
      </ul>
      {{/}}
Karl Jackson November 8, 2022

Screenshot 2022-11-08 101426.png

Karl Jackson November 8, 2022

Is this what you're referring to? Asking because I ran the rule but didn't get any emails...I do have it scheduled to send at the next half hour, so we'll see

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2022

No - My last message was intended to be a replacement for your current rule.  You don't want the branch because that will iterate and send an email for every issue that meets the criteria.  You'll want to add a new Lookup Actions action right after the trigger, move your condition and send email action right under that and then delete the Branch.

Karl Jackson November 9, 2022

you lost me with this one. here is my interpretationScreenshot 2022-11-08 101426.png

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 9, 2022

No problem - Right after the Trigger, you want to use a Lookup Issues action with the desired query.  Then you want to remove the JQL from your trigger.

Karl Jackson November 9, 2022

Much appreciated, thank you!

Like Mark Segall likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events