Goal: Send a weekly automated message that says how many days are left in the sprint.
Attempt to Solve:
{{now.diff(issue.created).weeks}} works great as spelled out in the documentation.
However, I'm unable to get a result when I'm trying to access the sprint end date of an issue.
Below is my workflow
I get a value for {{now}} and I get a value for {{lookupIssues.get(0).customfield_100016.endDate.jiraDateTime}}, but the 3rd audit log value that is doing the date diff is blank.
I tested doing {{now.diff(lookupIssues.get(0).created).weeks}} and it properly returned a value.
So why can't the Sprint End Date be used for the date diff?
Or is there a better way to reach the goal?
The sprint field in issues is a list field, containing 0-to-many values. Please try getting the specific entry you need.
If your current sprint has the latest date, you may find the difference for an example issue in the lookup issues result with this:
{{now.diff(lookupIssues.first.sprint.endDate.max).days}}
For the first issue in the lookup result, this will check all possible assigned sprints for that issue, finding the one with the largest end date value, using it for the diff() with now.
Kind regards,
Bill
Thanks @Bill Sheboy . That did the trick! Do you know, is there a way to exclude weekends from the date diff?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may change the diff() units of measure from days to businessDays: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-difference---
That will be Monday - Friday, and does not use any site or project settings regarding non-working days or saved holidays.
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.
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.