Hi Community,
I'm trying to compare 2 date fields, target start and target end. Both are created for advanced roadmap. And I want to calculate the difference between these 2 fields and put the result in a number field -- I created one called 'Cycle time'.
I tried to use the smart value to achieve this. So, I make the formula like this:
"
{{issue.customfield_10023.diff(issue.customfield_10022).days}}
"
But the it just gives me result as null.
I tried to use {{now.diff(issue.created)}} to update the same numeric field. It works fine. Is it because the target start and target end is not a common date time field? Any suggestions? Thank you.
Yi
Hello @Yi Meng
It sounds like you might be working with an Automation Rule.
So that we can help you properly debug that rule please provide us screen images showing the entire automation rule, the details of each step, and all the details from the audit log for execution of that rule.
You may also want to incorporate Log action steps into your rule to print out values into the rule execution audit log to confirm the smart values are getting the values you expect. For instance you may want to print out these values right before you try to do the calculation.:
{{issue.customfield_10023}}
{{issue.customfield_10022}}
Hi @Yi Meng
Adding to Trudy's suggestions...
I believe those advanced planning fields are recognized as text and not date type inside of automation rules. Please try adding the toDate conversion. For example:
{{issue.customfield_10023.toDate.diff(issue.customfield_10022.toDate).days}}
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.