Macro is an expression in recurring task field that is evaluated during Jira issue creation e.g. {{now.jqlDate}} string is replaced with current date: '2018-10-15'
...
Following Automation smart values are supported
Smart value |
---|
{{now}} |
{{now.jiraDate}} |
{{now.jiraDateTime}} |
{{now.jqlDate}} |
{{now.jqlDateTime}} |
{{now.shortDate}} |
{{now.shortTime}} |
{{now.shortDateTime}} |
{{now.mediumDate}} |
{{now.mediumTime}} |
{{now.mediumDateTime}} |
{{now.longDate}} |
{{now.longTime}} |
{{now.longDateTime}} |
{{now.fullDate}} |
{{now.fullTime}} |
{{now.fullDateTime}} |
{{now.format(...)}} |
{{now.plusMinutes(...)}} |
{{now.plusHours(...)}} |
{{now.plusDays(...)}} |
{{now.plusBusinessDays(…)}} |
{{now.plusWeeks(...)}} |
{{now.plusMonths(...)}} |
{{now.plusYears(...)}} |
{{now.minusMinutes(...)}} |
{{now.minusHours(...)}} |
{{now.minusDays(...)}} |
{{now.minusBusinessDays(…)}} |
{{now.minusWeeks(...)}} |
{{now.minusMonths(...)}} |
{{now.minusYears(...)}} |
{{now.endOfMonth}} |
{{now.startOfMonth}} |
{{now.firstOfTheMonth(…)}} |
{{now.lastOfTheMonth(…)}} |
{{now.withDayOfMonth(…)}} |
{{now.withMonthOfYear(…)}} |
{{now.withNextDayOfWeek(…)}} |
{{now.toBusinessDay}} |
{{now.toBusinessDayBackwards}} |
{{now.ofTheMonth(…)}} |
Usage Smart values usage examples:
Macro expression | Result | Description |
---|---|---|
{{now.lastOfTheMonth(5)}} | 2021-06-25 | the last Friday of the month |
{{now.format("YYYY")}}-12-31 | 2022-12-31 | the last day of the current year |
{{now.endOfMonth.withNextDayOfWeek("TUE")}} | 2022-09-06 | the first Tuesday of the next month |
{{now.endOfMonth.plusDays(1).lastOfTheMonth(2)}} | 2022-09-27 | the last Tuesday of the next month |
{{now.format("Q")}} | 1 - the number between 1-4 | the quarter number |
{{now.format("Qo")}} | 1st 2nd 3rd 4th | the quarter name |
{{now.withDayOfMonth(25).withMonthOfYear(6)}} | 2023-06-25 | fixed day of the month and month of the year |
{{now.ofTheMonth(2, 5)}} | 2023-07-14 | the second Friday of the month |
{{now.format("ww")}} | 16 | Number of week, assuming today is 12.04.2021 and week begins at Sunday |
{{now.format("WW")}} | 15 | Number of week, assuming today is 12.04.2021 and week begins at Monday |
{{now.startOfMonth.toBusinessDay}} | 2023-12-01 | the first business day of the month |
{{now.startOfMonth.toBusinessDay.plusBusinessDays(19)}} | 2023-12-28 | 20th business day of the month, holidays not taken into account |
Date and Datetime macros
Anchor | ||||
---|---|---|---|---|
|
...
Examples of usage (assuming that today is 2018-10-15):
Macro expression | Result | Description | ||||
---|---|---|---|---|---|---|
{currentdate}
| 2018-10-15 | it evaluates to current date | ||||
{currentdate+1}
| 2018-10-16 | 1 day is added to current date | ||||
{currentdate-1}
| 2018-10-14 | 1 day is subtracted from current date | ||||
{{nowDate}} | 2018-10-15 | the same result as {{now.jqlDate}} | ||||
{{nowDate 'lastDayOfMonth'}} | 2018-10-31 | it returns date of the last day of the month | ||||
{{nowDate 'tz' 'America/New_York'}} | 2018-10-15 | current date in New York | ||||
{{nowDate 'locale' 'es' 'format' 'MMMM'}} | octubre | October month name in Spanish | ||||
{{nowDate 'add' '1M'}} | 2018-11-15 | 1 month is added to current date | ||||
{{nowDate 'add' '2w 3d'}} | 2018-11-01 | 2 week and 3 days added to current date | ||||
{{nowDate 'subtract' '1M'}} | 2018-09-15 | 1 month is subtracted from current date | ||||
{{nowDate 'subtract' '2w 3d'}} | 2018-09-28 | 2 week and 3 days subtracted from current date | ||||
{{nowDate 'format' 'ww'}} | 16 | Number of week, assuming today is 12.04.2021 and week begins at Sunday | ||||
{{nowDate 'format' 'WW'}} | 15 | Number of week, assuming today is 12.04.2021 and week begins at Monday |
Anchor | ||||
---|---|---|---|---|
|
...
Examples of usage (assuming that today is 2018-10-15 13:00):
Macro expression | Result | Description | ||||
---|---|---|---|---|---|---|
{currentdatetime}
| 2018-10-15T13:00:00.000 | it evaluates to current date | ||||
{currentdatetime+1}
| 2018-10-16T13:00:00.000 | 1 day is added to current date | ||||
{currentdatetime-1}
| 2018-10-14T13:00:00.000 | 1 day is subtracted from current date | ||||
{{nowDateTime}} | 2018-10-15T13:00:00.000 | the same result as {{now}} | ||||
{{nowDateTime 'lastDayOfMonth'}} | 2018-10-31T13:00:00.000 | date and time of the last day of the month | ||||
{{nowDateTime 'tz' 'America/New_York'}} | 2018-10-15T13:00:00.000-0400 | current date time in New York | ||||
{{nowDateTime 'locale' 'br' 'format' 'MMMM'}} | Here | October month name in Portuguese | ||||
{{nowDateTime 'add' '8h'}} | 2018-10-15T21:00:00.000 | 8 hours added | ||||
{{nowDateTime 'subtract' '8h'}} | 2018-10-15T05:00:00.000 | 8 hours subtracted | ||||
{{nowDateTime 'lastDayOfMonth' 'add' '8h'}} | 2018-10-31T21:00:00.000 | 'lastDayOfMonth' and 'add' functions combined | ||||
{{nowDateTime 'hour' 17}} | 2018-10-15T17:00:00.000 | set hour to 17 | ||||
{{nowDateTime 'lastDayOfMonth' 'hour' 16}} | 2018-10-31T16:00:00.000 | 'lastDayOfMonth' and 'hour' functions combined |
Anchor | ||||
---|---|---|---|---|
|
{{nowDate}}, {{nowDateTime}} macros have functions helping to format an output e.g.:
Macro expression | Result | Description |
---|---|---|
{{nowDate 'format' 'DD.MM.YYYY'}} | 15.10.2018 | |
{{nowDate 'format' 'MMMM'}} | October | |
{{nowDateTime 'format' 'DD.MM.YYYY HH:mm'}} | 15.10.2018 13:00 | |
{{nowDateTime 'lastDayOfMonth' 'format' 'DD MMMM'}} | 31 October | 'lastDayOfMonth' and 'format' functions are combined |
If you have any question please raise support request at our service portal. We are happy to help!
...