Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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'

...

...

Anchor
smart-values
smart-values
Smart values from Jira Automation

Following Automation smart values are supported

...

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

Date and Datetime macros

Anchor
date-macros
date-macros
Date macros

Tip
  • {currentdate} - use this macro to insert current date when Jira issue is created, adding/subtracting days is supported (see examples below)

  • {{nowDate}}   - use this macro when more sophisticated date manipulation is required e.g. set the last day of month, add months, weeks, days (see examples below)

...

Macro expression

Result

Description

{currentdate}

Status
titledeprecated
Use {{now.jqlDate}} instead.

2018-10-15

it evaluates to current date

{currentdate+1}

Status
titledeprecated
Use {{now.plusDays(1).jqlDate}} instead.

2018-10-16

1 day is added to current date

{currentdate-1}

Status
titledeprecated
Use {{now.minusDays(1).jqlDate}} instead.

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
datetime-macros
datetime-macros
Datetime macros

Tip
  • {currentdatetime} - use this macro to insert current date and time when Jira issue is created, adding/subtracting days is supported (see examples below)

  • {{nowDateTime}} -  use this macro when more sophisticated date manipulation is required e.g. set the last day of month, add hours, minutes (see examples below)

Examples of usage (assuming that today is 2018-10-15 13:00):

...