Forums

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

Automation - How to edit jira issue with the duration of the ticket based on Due date - Start date

Vanessa Formigoni February 5, 2024

I want to create a Jira automation to get a customized field automatically filled after I include the Start date and Due date. The customized field is Duration and I want to know how many days it took to have the ticket completed.

 

This is the format of the Start and Due date "MMM DD, YYYY" or Jan 18, 2024 for example.

 

I tried to use this 

{{#issue.duedate}}{{#issue['Start date[Date]']}}{{issue.duedate.diff(issue['Start date[Date]'], 'days')}}d{{/}}{{/}}

and other formulas and had no luck. I am always getting 2,020 as a result. 

1 answer

1 accepted

2 votes
Answer accepted
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.
February 5, 2024

Hi @Vanessa Formigoni 

Looking at that expression, it is unclear to me in what format you want to set the value for the diff: a number, text, etc.

The diff value itself would be:

{{issue.Start date.diff(issue.duedate).days}}

Please adjust if the smart values in your Jira site are different.

Kind regards,
Bill

Vanessa Formigoni February 5, 2024

Thank you so much Bill.

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events