This seems like it should be super simple, so I'm probably overlooking something, but how can I send email notifications on the date a sprint ends (not when it is closed, but when the sprint end date arrives), either through automation or a filter subscription? I've almost been able to get this to work in automation by creating a daily trigger, use JQL to search my project and open sprint, then use an issue's max end date {{issue.sprint.endDate.max}} and compare to the current date, if they match send an email....but this will run for EVERY issue that matches the trigger's JQL which is obviously not going to work (is there a way to only run one time or something programmatic like exiting after 1 run?).
In theory it should be something as simple as run a daily trigger, project = 'PROJ NAME' and sprint in openSprints(), then grab the sprint end date, if end date == {{now}} send email. But it appears everything with automation is issue based.
Hi @Eric Meinders -- Welcome to the Atlassian Community!
You describe you almost got this to work with a rule, and so I will assume some things for your scenario.
Assumptions:
If those assumptions fit for your scenario, such a rule could be this:
project = yourProjectName AND sprint IN openSprints()
The key here is grabbing an example issue in the sprint, and using the maximum endDate value for the comparison to the current date. You may want to add time zone conversions if you try to run this very early in the day if you are near the UTC+0 location.
Kind regards,
Bill
Ding ding ding, you nailed it Bill! The key was the `.first` property for the lookupIssues smart value - that is exactly what I was looking for as it's something very common with programming, but I could not find anything about it in the smart value KBs or community posts. Thanks!
P.S. I also had no idea about the |0 operator for adding default values in the event it returns null, that's also super helpful for future use cases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that helped!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Eric Meinders
Welcome to the Atlassian community.
JQL is designed to return issues so if your automation is using a JQL statement then yes it will be issue-oriented.
Also note that sprints are not necessarily associated to a single project. Sprints are created within Scrum boards, and the scrum board filter can reference any number of projects.
If you want to get a list of sprints, you could do that using the Send Web Request action in an Automation Rule, and call the REST API to get sprints for a board.
That doesn't include any parameters to let you filter the sprints returned based on criteria beyond the active, future, closed state of the sprint. You would have to parse the returned data to find the sprints with end dates that are today.
I don't have any specific guidance on how to parse the data. I haven't worked with the Send Web Request action very much.
There is this community article on using that action, which you might find helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.