Going Stellar

Home/Smart values reference

Jira Automation smart value

plusDays() and minusDays() in Jira Automation: examples

Each unit has a plus and a minus function: Millis, Seconds, Minutes, Hours, Days, Weeks, Months, Years and BusinessDays. They take a number and return the moved date, which you can chain or format. Typical uses are due dates, reminders and cut-offs.

Syntax

{{date.plusDays(7)}}
{{date.minusMonths(1)}}
{{date.plus<Unit>(number)}}

Arguments

ArgumentWhat it isRequired
numberHow many units to add or subtract, as a whole numberyes

Works on

  • Fields: due date and other date fields for days and longer units; date-time values for every unit
  • Returns: a date or date-time

Examples

{{issue.duedate.plusDays(7)}}

Postpones a due date by one week, keeping the date-only form.

Result:

2026-12-22

Run on Jira Cloud on .

{{issue.created.plusHours(48)}}

Calculates a 48-hour response deadline from the creation time.

Result:

2026-12-01T16:21:47.9+0000

Run on Jira Cloud on .

{{now.plusMinutes(30).shortTime}}

Gives the clock time of a reminder in half an hour, formatted for a message.

Result:

4:56 PM

Run on Jira Cloud on .

{{now.plusDays(7).minusDays(2).jiraDate}}

Chains a plus and a minus, then formats the result for a date field.

Result:

2026-12-04

Run on Jira Cloud on .

{{now.withMonth(1).withDayOfMonth(31).plusMonths(1).jiraDate}}

Starts from 31 January and adds a month, which lands on the last day of February.

Result:

2026-02-28

Run on Jira Cloud on .

{{now.minusYears(1).jiraDate}}

Finds the same day one year ago, for a year-over-year comparison.

Result:

2025-11-29

Run on Jira Cloud on .

Pitfalls

  • The function name carries the unit in plural: plusDays, not plusDay. A misspelled name, a quoted number such as plusDays("7"), or no argument at all renders empty (checked on Jira Cloud, November 2026).
  • Only whole units are added. now.plusDays(1.5) added one day, not a day and a half. A negative number works as a subtraction: plusDays(-3) went back three days.
  • A date-only field such as the due date accepts days, weeks, months and years, but minusHours() and plusMinutes() on it render empty (checked on Jira Cloud, November 2026).
  • Months are clamped to the end of the target month. 31 January plus one month is 28 February, not an error.

Sources

  1. Jira smart values: date and time (Atlassian Support)
  2. Use smart values to manipulate and format dates (Atlassian Support)

Markdown version · All smart values