Hi,
My team has a sprint for 2 weeks which always starts on 2nd Tuesday. Using automation I want to set a trigger where in once the sprint is started, any issue which added after two days of sprint start till the end of sprint, an email to be sent.
So far I'm thinking of using sprint start trigger and then adding JQL wherein it would simply contain created>startOfweek(+2d) and sprint in openSprint().
Any suggestion on how to go about it
I do something similar except I simply check if the field value Sprint is empty.
I then update that value to the current open sprint.
So long as you never want to intentionally leave issues outside of any sprints, this should work.
Hi Anand,
This is happening as the Sprint field has multiple values - one for each sprint it has been part of.
In order to do this correctly you will need to reference the first one,
{{#=}}{{issue.sprint.first.startDate.diff(now).abs.days}} > 2{{/}}
Hope that helps.
Cheers,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anand,
this should be possible but it comes with the caveat that it might not work if the issue had previously been in another sprint.
What you would need to do is:
* Field Value Changed Trigger: for value 'Sprint'
* JQL condition: sprint in openSprint()
* Compare Condition:
First value: {{#=}}{{issue.sprint.startDate.diff(now).abs.days}} > 2{{/}}
Condition: Equals
Second value: 1
* Action: send email
That should work for you but let me know if you have any issues!
Cheers,
John
Automation for Jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response John!
Could you please elaborate on what "{{#=}}{{issue.sprint.startDate.diff(now).abs.days}} > 2{{/}}" this would do?
Also, as per my understanding, this would work every time someone edits the sprint value in an openSprint, right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what I set and I went ahead and created an issue but didn't get any email.
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.
Hey Anand,
so with that string, essentially what we are doing is combining the date and math functions to determine if the current date {now} is more than 2 days from the sprint date. It's a little complex but it should work.
We will need to debug a little bit to find out what is going on.
Could you add a log action after the first condition using that string?
Also, could you add a debug into the compare condition? (this is just the info below)
{{#=}}{{#debug}}{{issue.sprint.startDate.diff(now).abs.days}} > 2{{/}}{{/}}
You can see more about the debugging here if you like.
Should be able to get to the bottom of it soon.
Cheers,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey John,
I've added both the log action and debug. Will send you screenshot if something is found.
Also, the sprint started on Tuesday (20th Aug) and today is Thursday (Indian Time). So I think our logic should work from Friday.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.