Forums

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

How to write a query to show the time a ticket was in a specific status

Jim Henry
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 24, 2023

Is there a query that will show me how long a ticket spent in a status?

Example: How long a ticket had at the status of testing.

I am trying to create an (organization) metric that shows the average time all tickets were in a specific status for a particular of time.

Thanks

2 answers

1 accepted

2 votes
Answer accepted
Mark Markov
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 Champions.
June 8, 2018

Hello @Paul Tiseo

There is problem not in ApplicationUser.
getPortalForProject need AplicationUser and Project object, but you input Integer.

referred
https://docs.atlassian.com/jira-servicedesk/3.8.2/com/atlassian/servicedesk/api/portal/PortalService.html

Paul Tiseo
Contributor
June 8, 2018

Yes! You got it. The error was misleading me. I was calling getPortalForProject() instead of getPortalForId().

(You are making lots of points off of me this week! :) )

Mark Markov
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 Champions.
June 8, 2018

hehe :) feel free to ask! Did my answer about get transition ids and names help you?

Paul Tiseo
Contributor
June 11, 2018

I haven't had the time to drill down on that one yet. Probably this week.

1 vote
Thanos Batagiannis [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 Champions.
June 8, 2018

Hey Paul,

How do you get the portalService ?

Paul Tiseo
Contributor
June 8, 2018

I think you were on the right track. I was using the wrong method by mistake, but the error was taking me elsewhere.

Suggest an answer

Log in or Sign up to answer