Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Calculating dates and retreating days

Junaid Shah
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.
December 15, 2014

Hi,

I want to calculate a performance index based on dates.

I want something like this:

 

PFI = (Delivery Date - Project Start Date) / (Revised Delivery Date - Project Date)

if PFI > 1

"Ahead of schedule"

else if PFI < 1

"Behind schedule"

 

Right now I've got a scripted field in JIRA 6.0 and I was thinking running a script there, but perhaps theres a different/better way of doing this?

Thanks

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
JamieA
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.
December 15, 2014

Creating a scripted field that does that simple calculation is fine, IMHO, given that all those inputs are properties (ie custom fields) of the particular issue?

If they are not then it's not so straightforward.

The alternative is using the expression function in Script Runner (other plugins are available). But you would need two queries, one to find things ahead of, and another to find things behind schedule. So you would put the conditional part of it inside the query.

 

 

Junaid Shah
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.
December 15, 2014

Yes those are the fields of the issue that Im trying to calculate on, do you have any pointers on how I can go about coding this. I'm not a experience javascript guy and not sure what type of built in functions I can use with this ? Thanks.

Junaid Shah
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.
December 15, 2014

Realistically what type of functions I can use to retrieve date fields in a type that i can manipulate to get the proper result

TAGS
AUG Leaders

Atlassian Community Events