Forums

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

DateDiff Automation and CustomFields

Marco Augusto Santinho Gonçalves August 27, 2021

Heelo guys im trying to use datediff with two custom fields and its not working, like on documentation:

 

{{[date1].diff([date2]).[unit]}}

 

if i use for example :

 

{{(issue.Start Date).diff(issue.End Date)

.days}}

 

In this way its not working.. im doing something wrong??

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.
August 27, 2021

Hi @Marco Augusto Santinho Gonçalves 

You may just have some misplaced parentheses.  Please try this:

{{issue.Start Date.diff(issue.End Date).days}}

If that does not work, please confirm your smart values names for your fields, as those are case-sensitive.  One way to confirm the smart values for fields is described in this how-to article:
https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/

Best regards,
Bill

Suggest an answer

Log in or Sign up to answer