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,558,797
Community Members
 
Community Events
184
Community Groups

How to check if "end date minus start date is >= 30 days"?

Edited

Hi community, been trying to use automation rule for check if "end date minus start date is >= 30 days". Unfortunately somehow not managing to get this by JQL alone, is this even possible? If not, any suggestions?

(btw, using custom fields 'Start Date' / 'End Date' for this)

Regards, Sascha

1 answer

1 accepted

1 vote
Answer accepted
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

You can not do arithmetic in JQL, unfortunately.

What you could do is introducing a new custom field "Duration" and update that with the end_date minus start_date value every time when one of those changes and both are available. It can be done with Automation for Jira using a single automation rule. Or you can do this with a scripted field, there are many apps for that.

Then you test if that field is < 30 in JQL. 

Thanks for the swift response, could you elaborate on 'update that with the end_date minus start_date value every time when one of those changes and both are available. ', possibly with an example even?

Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

Do you have Automation for Jira installed? (it is a requirement for this approach)

Like Sascha Wiltenburg likes this

Yes, I have automation for Jira installed and created a custom field as mentioned above

Like Aron Gombas _Midori_ likes this

Suggest an answer

Log in or Sign up to answer