i have created a rule to create schedule variance in Jira automation, the rule is executing perfectly but the answer is still 0.
i am using this formula,
{{issue.customfield_12425.diff(issue.customfield_11025).days.divide(issue.customfield_11025.diff(issue.customfield_11024).days)}}
please let me know where i am wrong.
Hello @Verma_ Shivam
Welcome to the Atlassian community.
What are the field types of each of the custom fields in that formula?
I recommend that you use that the Log action in the rule to:
Printing the values with the Log action will enable you to review the values to see if they match your expectations.
If that doesn't reveal the problem to you then please provide the following:
Hi Trudy,
All these custom fields are date picker field, i am trying to get value for (Actual End Date - Planned End Date)/(Planned End Date - Planned Start Date)
i am trying to capture the output of this formula in another custom field "Schedule Variance" which is a number field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that additional information.
I recommend that you use the Log action in the rule to:
Printing the values with the Log action will enable you to review the values to see if they match your expectations.
If that doesn't reveal the problem to you then please provide the following:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Verma_ Shivam -- Welcome to the Atlassian Community!
As Trudy describes, context is important for automation rule questions, so please include images of your complete rule, the audit log details, and explain the problem you are trying to solve.
For such types of rules, it also helps to use the Log action to write intermediate results and smart values to the audit to check the values are what is expected.
Until we see that information...
You describe "the answer is still 0", and that is certainly possible for the expression you show.
To get a fractional value, a math expression may be used. For example:
{{#=}} {{issue.customfield_12425.diff(issue.customfield_11025).days}} / {{issue.customfield_11025.diff(issue.customfield_11024).days}} {{/}}
If you wanted that to a specific number of significant digits, you could add the ROUND() function, for example to 2 significant digits:
{{#=}} ROUND( {{issue.customfield_12425.diff(issue.customfield_11025).days}} / {{issue.customfield_11025.diff(issue.customfield_11024).days}}, 2) {{/}}
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.