I want to create an automation that looks at the custom date field for when we believe we will finish a task. If that task is due to be complete in the next 7 days then I want Jira to send them a reminder of this for specific assingee's. Is this possible?
Hi @matt hodgson -- Welcome to the Atlassian Community!
For Jira Data Center, there are a couple of ways to do this:
Create a saved filter which returns the issues where they will be due in the next 7 days for the current user, and ask your team members to subscribe to it on the desired cadence.
Using two automation rules, one with a scheduled trigger to start the process and one recursive with an incoming webhook trigger to process each assignee, send an email to each one. This is a much more complicated approach.
Kind regards,
Bill
Hey there Matt,
Yes, this should be possible by creating a scheduled automation. You could use its JQL filter for issues where the date field is in 7 days range from "endOfDay()".
For each found issue, simply use a "Send Email" component, and you should be set.
The cron expression is not necessary, you can schedule it in any way you want to. In my example, it runs every day at midnight.
Best Regards,
Zuri Suwru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zuri, thanks for your response.
Is there a way I cab get it to send a single email referencing multiple issues to a single person with the issue summary in the email?
Thanks in advance
Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey again,
Yes, you can by first and foremost ticking "Process all issues produced by this trigger in bulk", on the trigger component. In our case it's the "When: Scheduled" block.
After doing so, we can list issues by using smart values in the body of the email, for example:
{{#issues}}{{key}}{{/}} - the key for each issue
Now, you may combine this with some HTML knowledge to construct some not so brutish email templates. (For this, you must have "Send as" selected as HTML and "Convert line breaks to HTML line breaks" off)
Hi All,
<br>
<br> Please note that these issues will reach their due date in less than 7 days;
<br>
<br>
<style type="text/css">
table, th, td {
border: 1px solid black;
}
</style>
<table>
<tbody>
<tr>
<th>Summary</th>
<th>Type</th>
</tr>
{{#issues}}
<tr>
<td><a href="{{toUrl}}">{{summary}}</a></td>
<td>{{issuetype.name}}</td>
</tr>
{{/}}
</tbody>
</table>
<br> Best Regards,
<br> Jira
Hope this helps,
Zuri Suwru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Zuri Suwru
This approach will not send one email per assignee with their issues. The reason is there is no Advanced Branch in Jira Data Center automation yet, preventing the iteration over the distinct assignees. The workaround I noted in my other post is to use a recursive rule to solve this.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Both,
I have managed to get the automation to work sending one link of links to a user for all their stories.
Is it possible to also show the epic link next to it though, this is the code I am currently using.
{{#lookupIssues}}
<a href="{{url}}" target="_blank">{{summary}} </a>
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Matt,
You are probably looking for something like this:
<a href="{{epic.url}}" target="_blank">{{epic.summary}}</a>
Bundled with your original, separated by a single dash:
{{#issues}}
<a href="{{url}}" target="_blank">{{summary}}</a> - <a href="{{epic.url}}" target="_blank">{{epic.summary}}</a>
{{/}}
Best Regards,
Zuri Suwru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zuri,
I gave that a go and the summary came though on the email but there was nothing for the epic.
It looked as though it was no different than just the summary on its own.
Thanks
Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.