Forums

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

New date field to calculate ticket start date + estimate

Daniel Hogg April 17, 2018

Hi there,


We're using Jira Cloud.

We've created a new date field (finish_date)

We'd like to populate this field automatically by adding the time estimate of a ticket to the date in the start_date field.


As far as i'm aware The fields in use have the following types:

finish_date = date type

start_date = date type

estimate = interval type

 

I understand that interval types can be be used to change the value of a date.

 

At the moment we've tried using the Power Scripts for Jira Addon but havent had any success.

 

date finish_date = customfield_10200 + originalEstimate; //customfield_10200 is start_date field, originalEstimate gets the value of ticket estimate

customfield_11605 = finish_date; // customfield_11605 is finish_date field.

 

Results in:

[SIL Error on line: 1, column: 40] java.lang.String cannot be cast to java.sql.Timestamp

 

Are there any other ways / addons that can be used to populate the finish_date field with the value of start_date + estimate?

Many thanks,

Dan

 

2 answers

1 vote
Mahesh S
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.
April 17, 2018

I hope Original estimate will be returned autonmatically in timestamp value. However, you need to convert date type to timestamp before adding with Original estimate. Try to return/display the value of each field and understand the outputs of each field before proceeding your calculations.

0 votes
Nic Brough -Adaptavist-
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.
April 17, 2018

There's also a misuse of data in here.  The estimates are for time effort, not duration.  It's wrong to say "X will be delivered in 3 days time because the estimate is 3 days".

And, in fact, your mathematics won't work.  When you have a 6 day estimate, just adding it to (say) midday Tuesday will not give you a finish date of midday Monday.  In a default Jira set up, it's going to come out as midday Thursday.

Original estimate is not for tracking what you are assuming.  If you need start and end dates, get the user to enter them as such, not try to calculate it from the wrong metric.

Suggest an answer

Log in or Sign up to answer