Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,228
Community Members
 
Community Events
184
Community Groups

automation for jira: minusDays(7) returns no value

Trying to figure out why {{issue.customfield_11479.minusDay(2)}} is not returning any values.

 

As you can see in the first log {{issue.customfield_11479}} returns a value, but adding the minusDays(2) it returns nothingMonosnap Automation - JIRA 2023-05-06 17-58-35.png

 

Monosnap Automation - JIRA 2023-05-06 17-55-24.png

1 answer

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.
May 06, 2023 • edited

Hi @Jeffrey Bistrong 

Please try using minusDays() instead of minusDay(), as I believe all of the plus/minus ones use a plural name for the units of measure:

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

Kind regards,
Bill

sorry got caught up in trying lots of the possibilities, but still nothing

Monosnap Automation - JIRA 2023-05-06 18-57-57.png

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.
May 06, 2023

What is the type of that custom field?

If it is not date type, you could add an asDate conversion before making the adjustment.

it is a date type, but it is a system field, so not sure if that has anything to do with it

 

Monosnap Custom fields - JIRA 2023-05-07 09-30-18.png

 

However after multiple rounds of testing I got the following syntax to work. Thank you for pointing me in the right direction

 

{{issue.customfield_11479.toDate("yyyy-MM-dd").minusDays(7).jiraDate}}

 

Monosnap Automation - JIRA 2023-05-07 09-33-38.png

Like # people like this
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.
May 07, 2023

Thanks, and I believe Target Start is one of those advanced roadmap fields which has some oddity with automation rules.  Other built-in/system fields like that are indeed text and not date or date/time type, and so the conversion was needed.  (Another example is the Status Category Changed Date, which is text for a date/time value.)

Like Stefan Salzl likes this

Suggest an answer

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

Atlassian Community Events