Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Monday of a custom field date

Myles Boyd
Contributor
February 6, 2025

I have found  this to calculate next Monday how do I calculate the Monday of this week, even if in the past.

 

 

{{now.withNextDayOfWeek("MON")}}

2 answers

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2025

Hi @Myles Boyd 

Please try using one of the with... functions, such as

  • withDayOfWeek()
  • withDayOfWeekName()
  • withDayOfWeekShortName()

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-with-attribute---

Kind regards,
Bill

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 15, 2025

UPDATE:

Those functions are not working with the inline format for Jira Cloud, tested as recently as today, 15 Feb 2025 0845 Pacific Time.  I do not know when they stopped working.

The only one that is currently working is the long-format of withDayOfWeek():

{{#now}}func=withDayOfWeek(1), format="yyyy-MM-dd"{{/}}

 

Please see a related post on my testing for the functions:

https://community.atlassian.com/t5/Jira-questions/Re-Re-Auto-popute-Due-date-field/qaq-p/2945838/comment-id/1104337#M1104337

 

0 votes
Myles Boyd
Contributor
February 6, 2025

Hoping its

.withNextDayOfWeek("MON").minusDays(7)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events