Calculating status timings

@Fidel Castro Armario

 I  have one requirements .

i have the some status flows like below for one queue .

open --> in progress (Named as T1)

in progress --> waiting for vendor (Named as T2 )

waiting for vendor --> in progress (Named as T3)

 in progress --> resolved (Named as T4)

Now i have to calculate the total time taken to resolve the issue with below condition .

if i changed the status from in progress to waiting for vendor Then i have to add the time from 

open --> in progress 

and 

in progress --> waiting for vendor 

and then again i need to take only the time 

in progress --> resolved .

 

i.e ( T1 + T2 +T4) = Total time 

i need to eliminate the time T3 .

And also i have to check with the business hours also .

 

is it possible ???

1 answer

1 accepted

The following formula will calculate the time the issue has rested in "Waiting for vendor" status:

sum(mathOnNumberList(timesOfTransition("Waiting for Vendor", "In Progress"), ^ - nthElement(timesOfTransition("In Progress", "Waiting for Vendor"), indexOf(^, timesOfTransition("Waiting for Vendor", "In Progress")))))

please, revise that the names of statuses are correctly written, respecting the case.

You can subtract that value to the time from issue creation to issue resolution:

{00112} - {00009} - sum(mathOnNumberList(timesOfTransition("Waiting for Vendor", "In Progress"), ^ - nthElement(timesOfTransition("In Progress", "Waiting for Vendor"), indexOf(^, timesOfTransition("Waiting for Vendor", "In Progress")))))

where {00112} is field code for Date and time of creation, and {00009} is field code for Date and time of resolution.

In the first question I have eliminated only one transition ...

Is it possible to eliminate more than one transition timings

The time we have eliminated is the time the issue has remained in a certain status, i.e., the time between the transition that moves the issue to the status, and the one that moves the issue from it.

You can do it simply by including in your formula more terms like this:

sum(mathOnNumberList(timesOfTransition("Status B", "Status C"), ^ - nthElement(timesOfTransition("Status A", "Status B"), indexOf(^, timesOfTransition("Status B", "Status C")))))

Where the transitions are:

  • Status A -> Status B: transition for entering in the status whose time we want to remove
  • Status B -> Status C: transition for leaving the status whose time we want to remove

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

42 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you