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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can Jira Automation be used to send users a list of issues that are due in the next N days?

I'm using an automation job to search for issues that are overdue and send reminder emails to the assignee.

What I want to do now is send a similar email on Mondays with a list of issues that are due that week.

Can Jira Automation be used for this or is the only solution to create an issue filter and tell people to subscribe to it?

3 answers

1 accepted

3 votes
Answer accepted

Yes this can be done using Jira Automation. 

Set the automation on a schedule using a Cron Expression, then use the action "Lookup Issues" provide the JQL to return the issues due that week. 

Then add the "send email" action and include the following in the email body to print out a list of the issues;  

{{#lookupIssues}}
* {{key}} | {{summary}} [.....etc]
{{/}}

Where key, summary can be replaced or added to with these smart values, (custom fields in the future hopefully) 

  • {{key}} - Returns the issue key

  • {{url}} - Returns the issue url

  • {{summary}} - Returns the issue summary

  • {{assignee.displayName}} -  Returns the assignee

  • {{reporter.displayName}} -  Returns the reporter

  • {{status}} - Returns the status

  • {{issueType}} - Returns the issue type

  • {{resolution}} - Returns the resolution status

  • {{fixVersion}} - Returns the fix version

  • {{created}} - Returns the date the issue was created

  • {{updated}} - Returns the date the issue was updated

  • {{Story Points}} - Returns the story points for the issue (classic Jira Software)

  • {{Story point estimate}} - Returns the story points for the issue (next-gen Jira Software). Learn more about using smart values with numbers.

Source: https://support.atlassian.com/jira-core-cloud/docs/automation-actions/  

Can this be used in a way that each assignee only gets sent their issues?

If you're just running this for your scrum team or a small group perhaps you could just sort the JQL by the assignee and include {{assignee.displayName}} in the email so each person's tickets are grouped together and visible in the list. 

OR// If you have a small number of assignee's that don't change often you could include the assignee in the JQL and create a separate rule for each person. 

HOWEVER// If the group of assignees is large and always changing, which would make this a nightmare to maintain I'd suggest going with @KAGITHALA BABU ANVESH 's solution but they'd end up with an email for each. 

As the people needing the notification are a few I defined the emails specifically in the automation configuration.

I tried to have the assignee as the recipient but that did not work because in the initial trigger there is no JQL query and the assignee value is from that query. Not from the look up issue filter.

Works for now, thanks for the information.

Wasn't sure if this would work but it did :) !!!!! 

{{lookupIssues.assignee.emailAddress}} 

Screenshot 2021-01-27 120831.png

Like Aleksandr likes this

Thanks, Tom.  Please note there is a specific suggestion to make this better by only including the issues in the lookup for each assignee:

https://codebarrel.atlassian.net/browse/AUT-1975

__Bill

Like Tom Williams likes this

Is the "Lookup Issues" action only available on Cloud version?  I've been poring over all the options and do not see this one.

Hi @Kim Dinh 

Yes, Lookup Issues is in Cloud only.  The equivalent in Server version is the smart value {{issues}}  Please note the plural as this is a list.

https://confluence.atlassian.com/automation/smart-values-993924860.html

Best regards,

Bill

@BillSorry to bug you but I can't figure out what's wrong.  I have this block in my Send Email action.  I get the email, but none of the data is displayed, just the |.  I know the query is working, because I can see the list of tickets in Audit Log.

 

| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
...

 

 

{{#issues}}
{{#issues}}{{key}}{{/}} | {{#issues}}{{summary}}{{/}} | {{#issues}}{{status.name}}{{/}}
{{/}}

 

Can you help?  Is my syntax wrong?

Thanks much in advance!

Hi @Kim Dinh   No worries; glad to try to help.

When you loop over the issues, you only need the iterator stuff one time.  Like this to iterate one time over the {{issues}}.

{{#issues}}
{{key}} | {{summary}} | {{status.name}}
{{/}}

And, I am unclear for the Server version if anything odd happens with pipe (|) processing.  If that still doesn't work, try replacing the pipes with another character.

__Bill

That works, thanks @Bill !

Like Bill Sheboy likes this

Hi @Elvar Böðvarsson 

You may also send a single email with the upcoming due items by creating a saved/shared filter and then subscribing to it.  People who want the email can subscribe (for shared filters.)

Please see here to learn more about this feature:

https://support.atlassian.com/jira-core-cloud/docs/work-with-search-results/

Best regards,

Bill

I know about this feature and prefer not to use it as it just sends a dull list of issues. Much prefer Automation as with that I can include custom text.

Now if it were possible to combine those two :D have filters which people could subscribe to at will and that the email sent would be customizable by the filter owner

Like Bill Sheboy likes this

Hello,

Please try this once.

image.png

Every Monday 8.15 AM. assignee will notified with Due Date.

 

Cron+ JQL

image.pngNew Action

image.png

Hey sorry , I thought it's for a week.

Thanks.

This works but sends an individual email for each issue returned in the JQL. My solution below returns a list that could be sent in a single email. 

Like # people like this

Hi Tom,

Thanks for the information. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Automation

New to Jira Automation - goodbye Cron (sort of), hello new project created trigger, new additions to

Hey Everyone! Simeon from the Automation team here. I'm delighted to share some new features and improvements that we are shipping to Jira automation (Cloud only). Firstly, @Sam Harding&nbsp...

2,790 views 10 23
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you