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

0 votes
Accepted answer

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
Community showcase
Published Nov 29, 2018 in Jira

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,083 views 0 8
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