Is there a way to get an automation email if a sprint hasn't been closed or started?
Hello @Hari Shankar Gadamsetty
Welcome to the Atlassian community.
What criteria would you use to identify that the sprint should've been started? Would you want to compare the Start date of the sprint to the current date?
Similarly what criteria would you use to identify that the sprint should've been closed? Would you want to compare the End date of the sprint to the current date?
There are not pre-built functions that you could use to search for sprints based on criteria.
There is an API endpoint for getting all the sprints associated with a specific board. You have to provide the board ID as input to the API endpoint.
With that endpoint you can also provide the sprint states (i.e. future, active, closed) to limit the sprints retrieved. In your case you would want future and active sprints.
The results include the start and end dates of the sprints. You would have to parse the data to extract that and compare if (if the criteria I suggested above is what you want to use).
In an Automation Rule you can use the Send Web Request action to call the Jira REST API endpoint to get the data. This article provides an overview of using that action.
There is also an API endpoint for getting information about a single sprint, but you must provide the sprint ID.
You could incorporate the use of either of those into an Automation rule that evaluates the data provided and then generates and sends the email you want. You might want to set that up with a Scheduled trigger so that it runs periodically (daily, or on a scheduled that suits you).
In the Web Request URL:
- replace jira.atlassian.net with the URL for your Jira instance
- replace 9 with the ID number for your Scrum board. That shows in the browser URL field when you are viewing the board.
In the Headers:
- replace TokenGoesHere with you encrypted API token. Refer to the article I referenced before to get information about creating and encrypting a token.
Notice the information at the bottom of the action configuration.
If you want to check that the API call succeeded, add a Condition component after it to check the {{webResponse.status}} value.
To access the sprint data you will need to use the smart value {{webResponse.body}}
The Accepted Answer on the following post describes how to iterate over the results in the webResponse.body and take actions based on each one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can achieve this purely with Automation, and using a series of Smart Values to:
For checking if the Sprint End date is in the past, you can set-up an automation such as this:
Hope this helps.
Have a nice day!
Rik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe your JQL would get you a list of multiple issues in multiple open sprints.
{{lookupIssues.first}} would put the focus on just the first issue in that list
{{lookupIssues.first.sprint.endDate.max}} would look at only the open sprint for that first issue.
All other open/active sprints would be ignored.
You would need to add a branch to iterate over the list of issues and apply that condition to each one. And then you would potentially be getting multiple hits for a single open sprint that has multiple issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill ,
Thank you for addressing this! Could you please provide a screenshot of the automation rule for this setup? I attempted it from my side without any endpoint actions, and I'm new to this endpoint configuration. Could I get a screenshot for this request?
Also, as you mentioned,
how can we determine if the sprint should have started? Would you like to compare the sprint's start date with the current date? - yes
Likewise, what criteria would you apply to decide if the sprint should have been closed? Would you want to compare the sprint's end date with the current date? - yes
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.