Predefined values in any issue fields

 

Presented predefined variables are available for The Scheduler for Jira Cloud.

If you are looking for variables for Jira Server visit this page: Predefined Values in Summary and Description Fields

 

The Scheduler has predefined variables which can be used in any text field. When Scheduled Issue is fired these variables are converted to the corresponding values:

Variable

Meaning

Examples

Variable

Meaning

Examples

${fireCount}

Fire count

5

${createdDate}

Creation date in format YYYY-MM-DD HH:mm timezone

2017-02-02 14:41 Europe/Warsaw

${createdDate.day}

Creation day

2

${createdDate.month}

Creation month

February

${createdDate.shortMonth}

Creation month in number form

2

${createdDate.year}

Creation year

2017

${createdDate.date}

Creation date in format YYYY-MM-DD

02.02.2017

${createdDate.time}

Creation time in 24 hour format

14:41

${createdDate.timezone}

Creation date timezone

Europe/Warsaw

${createdDate.timezoneOffset}

Creation date timezone as time offset

GTM+01:00

${createdDate.weekOfMonth}

Creation date week of month

2

${createdDate.weekOfWeekYear}

Creation date week of week-based-year (see below)

28

${createdDate.weekYear}

Creation date week-based-year (should be used with .weekOfWeekYear)

2017

${dueDate}

Due date in format YYYY-MM-DD

02.02.2017

${dueDate.day}

Due date day

2

${dueDate.month}

Due date month

February

${dueDate.shortMonth}

Due date month in number form

2

${dueDate.year}

Due date year

2017

${dueDate.weekOfMonth}

Due date week of month

2

${dueDate.weekOfWeekYear}

Due date week of week-based-year (see below)

28

${dueDate.weekYear}

Due date week-based-year (should be used with .weekOfWeekYear)

2017

 

Since version v2.5.3 Oct 21, 2019 we have added format options for ${createdDate} and ${dueDate}. To both of these variables add .format("") and inside "" use desired date format. eg. ${createdDate.format("dd-MM-YYYY HH:mm")

You can use patters specified here: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#patterns 

Here you can see the example with quarters used in creation and due date: ${createdDate.format("'Q'Q.yyyy")} ${dueDate.format("'Q'Q.yyyy")}:

 

Note: 'dueDate' in Jira is a date field (compared to creation date which is a date time field), thus it doesn't support formatting for lower than 1d time intervals

 

Note: 'dueDate' variable supports standard Jira Due Date field, if you are using custom field for due date it won't work

 

 

We were receiving request about more flexible dates, calculations on those dates are not possible, but we have created new variables (since v2.5.3) allowing you use previous and next values:

List of all new variables :

${createdDate.nextDay}
${createdDate.nextMonth}
${createdDate.nextWeekOfMonth}
${createdDate.nextWeekOfWeekYear}
${createdDate.nextYear}
${createdDate.previousDay}
${createdDate.previousMonth}
${createdDate.previousWeekOfMonth}
${createdDate.previousWeekOfWeekYear}
${createdDate.previousYear}
${dueDate.nextDay}
${dueDate.nextMonth}
${dueDate.nextWeekOfMonth}
${dueDate.nextWeekOfWeekYear}
${dueDate.nextYear}
${dueDate.previousDay}
${dueDate.previousMonth}
${dueDate.previousWeekOfMonth}
${dueDate.previousWeekOfWeekYear}
${dueDate.previousYear}

Update v2.5.7, as a completion to variables ${createdDate.shortMonth} and ${dueDate.shortMonth} we added new variables with numbers:

${createdDate.nextShortMonth}
${createdDate.previousShortMonth}
${dueDate.nextShortMonth}
${dueDate.previousShortMonth}

Example

You can use these variables as shown below:

When the actual issue gets created, the result looks as follows:

Feel free to tell us what topic should be covered: thescheduler@psc-software.atlassian.net