Jira Automation smart value
weekOfYear and weekOfYearIso: Jira smart values
weekOfYear returns the week number in the traditional Western form and weekOfYearIso returns the ISO 8601 week number. Use them for weekly reports, sprint-style labels and rules that run on odd or even weeks. The two disagree on some days, so pick one and stay with it.
Syntax
{{[date].weekOfYear}}
{{[date].weekOfYearIso}}
Works on
- Fields: now, created, duedate and any date value
- Returns: a week number
Examples
{{now.weekOfYear}}The traditional week number of today. On Sunday 29 November 2026 it is one higher than the ISO number.
Result:
49Run on Jira Cloud on .
{{now.weekOfYearIso}}The ISO week number of the same day.
Result:
48Run on Jira Cloud on .
Week {{now.weekOfYearIso}} of {{now.year}}A label for a weekly summary comment or a Slack title.
Result:
Week 48 of 2026Run on Jira Cloud on .
{{issue.duedate.weekOfYearIso}}The ISO week of the due date of 15 December 2026.
Result:
51Run on Jira Cloud on .
{{issue.summary.replace("Hello World!","2027-01-01").toDate.weekOfYear}}On 1 January 2027 the traditional week is already week 1 (the text is turned into a date first).
Result:
1Run on Jira Cloud on .
{{issue.summary.replace("Hello World!","2027-01-01").toDate.weekOfYearIso}}The ISO number for the same day is still 53, because ISO counts it in the last week of 2026.
Result:
53Run on Jira Cloud on .
Pitfalls
- The two numbers can differ on the same day. On 29 November 2026
weekOfYeargave 49 andweekOfYearIsogave 48 (checked on Jira Cloud, November 2026). - Around the New Year the two can be far apart: 1 January 2027 is week 1 for
weekOfYearand week 53 forweekOfYearIso. Do not mix them in one rule. - The week number alone does not carry the year. Combine it with
{{now.year}}when week 53 and week 1 can meet in the same report.
Related
- dayOfMonth, dayOfWeekName and other date attributes
- withDayOfMonth(), withMonth() and other with… setters
- diff()
- Date formats (jiraDate, format(), shortTime…)
- startOfMonth and endOfMonth