Forums

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

Time in Source Status JQL

Theresa Tran
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!
July 16, 2018

Without using plugins, what is the best way to pull the time in each status?

I'm trying to pull the time from (Open to In Progress) and (In Progress to Ready for Testing) in the TRANSITION tab. Unfortunately, I cannot figure out how to use JQL to pull the total of these numbers (in a handful of defects). 

 

1 answer

1 vote
Mesut Yilmazyildirim
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.
July 16, 2018

Is this what you are looking for;

select 
p.pkey||'-' ||i.issuenum as jira_id,
s.pname last_status,
row_number() over(partition by st.issueid order by st.groupid) status_order,
st.status S_from,
st.new_status S_to,
nvl(st.date_start,i.created) as start_time,
st.date_end as stop_time,
round (st.date_end - nvl(st.date_start,i.created),3) stop_start
from jirasd.jiraissue i,
jirasd.project p,
jirasd.issuestatus s,
(select cg.issueid, cg.id as groupid, to_char(ci.newstring) new_status, to_char(ci.oldstring) status,
LAG(cg.created) OVER (partition by cg.issueid ORDER BY cg.id) date_start,
LAG(cg.id) OVER (partition by cg.issueid ORDER BY cg.created) prev_groupid,
cg.created date_end
from jirasd.changeitem ci,
jirasd.changegroup cg
where ci.field = 'status'
and ci.groupid = cg.id
) st
where p.id = i.project
and i.issuestatus = s.id
and st.issueid = i.id
Cameron Pierce
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!
May 6, 2020

Thank you, the solution was very helpful.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events