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

Automated scheduled e-mail for issues done without time logged

fran.quintero
Contributor
May 10, 2021 edited

Hi!

Trying with Automation for Jira the following:

  1. Rule with scheduling every 2 days
  2. I want that all projects that have issues in status done but without logged time (time spent)
  3. If there are issues that satisfy that condition, then send one e-mail to the project lead.

 

Several problems with that:

  • If I schedule with a condition like the following: issuetype not in (Epic, Test) AND timespent is EMPTY AND status = Done , then I'll send X e-mails, where X is the number of issues. I just want one e-mail to be sent.
  • I tried to schedule without a JQL condition, but then I cannot create a rule with a condition "time spent IS EMPTY" or at least, I don't know how.
  • Creating and e-mail, I cannot send one to {{issue.project.lead}}, it gives me error. I can send with a specific e-mail, but want to avoid this behavior for maintenance reasons.

 

Could you help me with this?

 

 

2 answers

1 accepted

2 votes
Answer accepted
John Price
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.
May 10, 2021 edited

Hi Fran - 

 

I just had this problem last week.  Here's what worked for me:

  • Create Scheduled rule but don't add a JQL search, because as it says, that will execute the action(s) once for each issue (spam!).
  • Create Action of Lookup Issues and enter your JQL.
  • Create Send Email step and but something like this in the body:

    Hey team - we've got the following issues that need review:
    {{#lookupIssues}}
    * {{key}} - {{summary}}
    {{/}}

The syntax for looping there is a little weird.   Poke around the docs and you can find examples to include links, etc.  Good luck!

email rule.png

fran.quintero
Contributor
May 10, 2021

Hi John!

That is working for me! I even used your smart value tokens to more useful info ;)!

Being a bit picky, I realized that those smart value tokens aren't filtering by project lead, so it's e-mailing a list of issues from all projects, not just the ones from a given lead.

I updated my "Lookup Issues" condition: project in projectsLeadByUser("user.name") AND issuetype not in (Epic, Test) AND timespent is EMPTY AND status = Done

It seems that only works with my username, when I try other usernames it says that they don't exist. Did you encounter that in one of your configurations?

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.
May 10, 2021 edited

Hi @fran.quintero 

Have you considered solving this with saved filters and a subscription?  Once the filters are created/shared, you could ask the project leads to subscribe the filters relevant to them.

One advantage of this approach is that it will not use any of your license quota for global/multi-project automation rule executions.

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Upcoming Jira Events