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

Sascha Wiltenburg May 23, 2023

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. 

Sascha Wiltenburg May 23, 2023

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
Sascha Wiltenburg May 23, 2023

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