I'm trying to set the dueDate field and not having much luck.
Trigger - When an Issue is scheduled to a Sprint, part the Sprint name for date information and set the dueDate field.
The sprint name has the following convention
ProjID-Num MM-DD - MM-DD
Where the first MM-DD is the start date and the second is the end date of the sprint.
I have been using the following to set the date in the automation
{{issue.Sprint.name.substringAfterLast(" ").concat("-21").toDate("MM-dd-yy")}}
which is converting the date correctly, but the field is being set and remains null after the trigger runs.
What am I missing?
First, it may help if you post an image of your complete rule and the audit log for a rule execution so the community can comment.
Next, you may want to make the year section dynamic, extracting the year from {{now}}
{{now.jiraDate.left(4)}}
And then, try removing the toDate() expression and see if the rule can implicitly cast it correctly
Best regards,
Bill
Thanks for the idea. The issue is when the sprint is an upcoming year, so using the now function without some logic doesn't work. There really isn't an easy way to address this in automations, so I am just going to add the year to the sprint name.
I was able to get it to work with the following change from
{{issue.Sprint.name.substringAfterLast(" ").concat("-21").toDate("MM-dd-yy")}}
to
{{issue.Sprint.name.substringAfterLast(" ").concat("-21").toDate("MM-dd-yy").jiraData}}
I am not sure if this is the most efficient expression, or why adding jiraDate solved the problem. The docs don't provide this direction at all (very frustrating) and I got the idea after seeinganother community question regarding automation an dates.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Isaac,
How do you know if it will be in a next year versus the current one? If you can determine that within the rule you could use an If/Else condition to set the date, and increment the year for {{now}} with the function plusYears(1)
If this year use {{now.jiraDate.left(4)}}
else use {{now.plusYears(1).jiraDate.left(4)}}
__Bill
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.