Forums

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

Jira Automation: How to calculate difference of changelog dates?

Vidhya Kumar September 6, 2022

Hi all,

I have tried every possible solution trying to get the difference of {{changelog.duedate.to}} - {{changelog.duedate.from}} but I keep getting a null result.

The function I have been using and variations of it is {{changelog.duedate.to.diff(changelog.duedate.from).days}} but the value is always empty.

Any help would be greatly appreciated. Thank you.

1 answer

1 accepted

1 vote
Answer accepted
Manon Soubies-Camy
Community Champion
September 6, 2022

Hi @Vidhya Kumar,

I'm not sure why it is not working with changelog, but it works when using fieldChange:

{{fieldChange.to.toDate.diff(fieldChange.from.toDate).days}}

I triggered my automation rule when value changes for Due date.

Hope this helps!

- Manon

Vidhya Kumar September 6, 2022

Hi @Manon Soubies-Camy

Thank you so much, you're a lifesaver! Yeah you'd imagine the same outcome would apply cause it works fine with {{issue}} or {{triggerIssue}} dates but not {{changelog}}.

This will do the trick for now, thank you once again.

- VK

Like Manon Soubies-Camy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events