Unable to capture Difference days between Target Start and Target End date custom fields automation

Kedareswar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 27, 2024

I am Unable to capture Difference days between Target Start and Target End date custom fields through automation

This scenario i was using to find the days between Target Start and Target End of an Epic to find out and converting into Business hours as 8 hrs. per Day

Any suggestions and solutions will be helpful

2.PNG3.PNG

1 answer

0 votes
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.
May 27, 2024

Hi @Kedareswar -- Welcome to the Atlassian Community!

First thing, I am using Jira Cloud and not Data Center version of automation.  Please test my suggestions to confirm they work for your version.

 

Smart values are name, spacing, and case-sensitive.  When an incorrect one is used, they evaluate to null and lead to unexpected rule behavior / errors.

The correct smart values for those fields are: {{issue.Target start}} and {{issue.Target end}}

 

With Jira Cloud, I recall those advanced roadmap, date fields appear as text (rather than dates) inside of automation rules.  Please try converting them to dates before the diff() call:

{{issue.Target start.toDate.diff(issue.Target end.toDate).days}}

 

If neither of those works, please try the custom field id for the fields rather than their displayed names.  You may find those custom field ids for your Jira site with this how-to article: https://confluence.atlassian.com/automation/find-the-smart-value-for-a-field-993924665.html

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer