Hello, I'm new to this great add-on and am looking for a little help with date functions.
I've created some simple Create Issue tasks using the Recurring Tasks template and want to set their due dates. It looks as though I could accomplish this with the
{{#now}}func=plusDays(num days){{/now}}
function but am wondering if I can employ other functions to set the Due Date.
If I wanted to set the Due Date to May 1st of the current year (2017) would the function look like this:
{{#issue.due}}func=withDayOfMonth(1).withMonthOfYear(5){{/}}
If I wanted to set the Due Date to May 1, 2018 would the function look like this?
{{#issue.due}}func=withDayOfMonth(1).withMonthOfYear(5).withYear(2018){{/}}
Would these or some variation go right in the Due Date field or need to go in the additional fields area using JSON?
Also, am I correct that there are no existing functions for:
The last day of a specific month
The first business day of a specific month
The last business day of a specific month
Thank you
Hi Bill,
Thanks for using Automation for Jira.
You are pretty much right on and these values can put into the Due Date field.
Here are some examples that you could use:
// 1st of may this year
{{#now}}func=withDayOfMonth(1).withMonthOfYear(5){{/}}
// 1st of may next year
{{#now}}func=withDayOfMonth(1).withMonthOfYear(5).plusYears(1){{/}}
// last day of May
{{#now}}func=withDayOfMonth(1).withMonthOfYear(6).minusDays(1){{/}}
// first business day in May
{{#now}}func=withDayOfMonth(1).withMonthOfYear(5).toBusinessDay(){{/}}
// last business day in May
{{#now}}func=withDayOfMonth(1).withMonthOfYear(6).minusDays(1).toBusinessDayBackwards(){{/}}
Hope that helps.
Cheers,
Nick
Very simple and straightforward. Your help is much appreciated! -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.