Forums

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

Trying to set up an automation to email assignees when there is just a few days left in the sprint

Maggie Spitchka February 13, 2023

I was trying to follow the article below but I don't believe we use 'due dates.' Was wondering if there's a way to set up an automation so that it sends a reminder like 4 days before the sprint ends? Are there other articles I can follow for this?

https://confluence.atlassian.com/automationkb/automation-rule-to-get-email-notification-along-with-report-before-5-days-of-due-date-1130727687.html

1 answer

1 accepted

0 votes
Answer accepted
Mikael Sandberg
Community Champion
February 13, 2023

I have two options that you could use, the first one would be to have two automations. The first one would trigger on when the sprint starts and it would set the due dates on all issues associated with that sprint. The second automation would then be based on the article you found.

The second one would use REST API calls to get the end date for the sprint and then compare that to now to see if the email should be sent. This option is more complicated since you need to know the sprint Id in order to get the end date.

Maggie Spitchka February 13, 2023

Would the due dates need to be adjusted if an issue were moved to the following sprint? Would like to avoid duplicative work since we move them around based on workload priority. 

The second option - I assume you'd have to provide the sprint ID for each automation of this?

Mikael Sandberg
Community Champion
February 13, 2023

If you set the due date when the sprint is started then you would not need to adjust it if an issue is move to a different sprint. The only exception to this would be if you move the issue to another open sprint.

Correct, you would need to know the sprint Id for each sprint, so in order to automate it you would have to use project properties and store the current active sprint Id there. The more I think on it the second option would involved a lot more work to make it fully automated.

Maggie Spitchka February 15, 2023

If you set the due date when the sprint is started then you would not need to adjust it if an issue is move to a different sprint. The only exception to this would be if you move the issue to another open sprint.

^can you clarify the difference? we very often have issues in a sprint that are moved to the next sprint that starts in 2 weeks 

Mikael Sandberg
Community Champion
February 15, 2023

If you create the automation to trigger on sprint started then that would also update the due date for issues that are moved over from one sprint to the other.

Maggie Spitchka February 15, 2023

Okay got it - could you help me to create this automation for the first option?

Mikael Sandberg
Community Champion
February 15, 2023

The automation would look something like this:

Screenshot 2023-02-15 at 9.52.26 AM.png

Maggie Spitchka February 16, 2023

Got it - so set that up and then how do I do the email trigger when ~3/4 days out from the sprint end date?

Mikael Sandberg
Community Champion
February 16, 2023

It would look something like this:

Screenshot 2023-02-16 at 11.26.42 AM.png

Maggie Spitchka February 16, 2023

Thank you so much - here's the two rules I've created. I assume they have to be separate correct? Also, if I'm trying to send an email versus a comment to the issue, is this the right "assignee" to pick to send it to who is assigned to the story?

 

setting end date.PNGemail 3 days.PNG

Mikael Sandberg
Community Champion
February 16, 2023

Yes, that looks correct.

Maggie Spitchka February 24, 2023

Maybe you can help me with this one too - I'm trying to send an email at the beginning of a sprint to let people know its open. It works for the CCs when I put in myself and someone else, but I can't figure out who's the right person to send "to" for it to send to all those assigned to issues. I've tried both "assignee/(s)" and "team members" but it seems to error out and only send to the CCs. Ideas?

 

email at start of sprint.PNGerror jira.PNG

Mikael Sandberg
Community Champion
February 24, 2023

The sprint doesn't have an assignee, or team members so you need to know who to send the email to. You could do a lookupIssues and use that to send out the email. But that would generate an email for each issue, so I would probably use a group email instead.

Maggie Spitchka February 27, 2023

Great - I'll do a group email then, how does that work? :) 

Like Mikael Sandberg likes this
Mikael Sandberg
Community Champion
February 27, 2023

Just create a group in Jira and then add the users that should receive the email to that group. Then in the automation you can use that group in the to field like this:

Screenshot 2023-02-27 at 9.54.41 AM.png

Maggie Spitchka February 28, 2023

Got it - quickly changing back to the prior topic above, for the emailing assignees 4 days before issues are complete, can you confirm if I need to put special criteria to ensure this does NOT send for issues that are done/complete?

Mikael Sandberg
Community Champion
February 28, 2023

In the JQL that is being used by the automation, just add statusCategory != Done to it and that will exclude any issues that are in a Done status (green color if you look at the workflow).

Maggie Spitchka February 28, 2023

Thank you! I used "and" and then what you you wrote - hope that's right. For the creation of a group, I see on other articles you need to be a JIRA admin is that right? I'm a superuser/admin in the project but not overall of the company JIRA, is there another way to do that or no? 

Mikael Sandberg
Community Champion
February 28, 2023

The only other way, if your Jira admin doesn't want to create a new group would be to create a distribution list that you could use instead, like projectx@example.com.

Maggie Spitchka March 6, 2023

Hi Mikael - today was the day this email notification was set to run (4 days before due date of 3/10); looks like it only went for one story? Any idea how to troubleshoot?audit jira.PNG

Mikael Sandberg
Community Champion
March 6, 2023

The easiest way to troubleshoot is to run the JQL and see how many issues it returns. 

Maggie Spitchka March 6, 2023

Like this? Does this mean it was sent to 33 but the audit log just doesn't have them all or what?

jira q.PNG

Mikael Sandberg
Community Champion
March 6, 2023

If you uncheck the "Only include issues..." that should help. Because you are checking the due date it should should only include issues one time in the automation.

Here is what I would do, make a copy of your rule and instead of sending an email just create a log action that you set to maybe {{issue.key}} and then run the rule. You would then see if all 33 issues are included in the rule or not. If they are after unchecking the "Only include issues..." I would manually run the original one if you want to send out the emails.

Maggie Spitchka March 9, 2023

So the admin pointed me to create a "team", but when I do that I don't see the option to send email to the team within automation. Is it possible? Or do I need to really get him to create a group?

Mikael Sandberg
Community Champion
March 9, 2023

You need to get him to create a group, teams are not yet available in Automation. Team is just in it's early stages, more features around should be coming in Q3-Q4 2023 based on Atlassian's public roadmap.

Suggest an answer

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

Atlassian Community Events