Hi,
I am wondering how I can get endDate from the newest spring assigned to the issue?
I have an automation which updates Issue `Due date` when new sprint is added to the issue.
{{issue.Sprint.endDate.minusDays(1).jiradate}}
Problem is that issue can have more than one sprint and that smart value return endDate from the oldest Sprint.
Until a sort option/function is added to lists, we cannot rely upon first and last for a scenario like yours. (The exception is when you do have a sort, ORDER BY, for things like lookup issues with JQL.)
For your scenario, let's assume your newest sprint is the one which ends the latest. If that is the case, you can use this:
{{issue.Sprint.endDate.max}}
If that does not work for some reason, there is a much more elaborate work-around, using a REST API call and smart value, list filtering. Hopefully you will not need that one :^)
Kind regards,
Bill
Hi Bill,
Thank you for your support.
Your suggestion solved my issue.
Smart values used by me:
- for start date:
{{issue.Sprint.startDate.max.jiradate}
-for end date:
{{issue.Sprint.endDate.max.minusDays(1).jiradate}}
Best regards,
Bart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bartlomiej Bukowski , try using the "last" function.
{{sprint.endDate.last.minusDays(1).jiraDate}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jack,
I tried both
{{issue.Sprint.last.endDate.minusDays(1).jiradate}}
and
{{sprint.endDate.last.minusDays(1).jiraDate}}
It will give different date but not from the current sprint.
Example:
- Issue has already Sprint1 and Sprint2 set up
- Adding Sprint3
- DueDate set on issue changes to the date from Sprint2 and not from Sprint3.
Old smart value which is
{{issue.Sprint.endDate.minusDays(1).jiradate}}
will set up DueDate from Sprint1
There is a progress but it's not the solution yet.
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.