Forums

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

How to get time spent in certain status per issue

Pooja
Contributor
August 21, 2018

Hi,

Is there any JQL Query to find the time spent (start date and End date) on the particular status per issue, without the help of add-ons.

Thanks in advance

8 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
laralg
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.
August 21, 2018

Hello Pooja,

Sadly there is no solution for just one issue on the issue navigator, but you have Gadgets with give you a little insight on that information. In your dashboard you can add the following gadgets:

image.pngRegards

Pooja
Contributor
August 23, 2018

Hi Lara,

Thank you For your Suggestion, But I want to export it in the Excel Sheet at the end of the day, which is not possible with reports.

Regards,

Pooja

Like Gustavo Sant 'Anna likes this
Mahesh Kallepalli
Contributor
October 29, 2019

@Pooja 

 

Have you got solution for this issue , We also need same reports . Can you help me out how you get resolved this issue .

Like # people like this
Pooja
Contributor
October 30, 2019

Hi @Mahesh Kallepalli ,

 

We have not  got any solution for this, so we extracted directly from database by power BI

Like # people like this
anuraj_sl
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!
February 18, 2020

@Pooja  Can you explain how you managed to get that ?

Yojana February 26, 2021

@Pooja  I want same

Like # people like this
Hitesh.Kumar
Contributor
April 12, 2022

Hi @Pooja - Can you share, how did you use power BI to get details for the time spent (start date and end date) on the particular status per issue, without the help of add-ons?

Pooja
Contributor
April 12, 2022

@Hitesh.Kumar , Our DB has created read only database user access and connected with Power BI tool, Our Power BI team has integrated Jira db with Tool, not sure how,

Like # people like this
5 votes
Julia Denys
Contributor
July 17, 2019

Hi @Pooja

Unfortunately, there is no way you can find the time spent (start date and end date) on the particular status per issue with JQL Query, but you can achieve it with Time in Status for Jira Cloud by SaaSjet.

With this tool, you can easily track the number of times an issue has been in every status. Also, you can get information about the time in status for each stage in a workflow and the number of times a task has gone from status to status.

Safe to say, this add-on is a good way to get a helicopter view, find out bottlenecks and unproductive delays in your processes.

Additionally, you'll get 7 reports that show:

  • Time in Status
  • Assignee Time
  • Average Time
  • Status Entrance Date
  • Time in Status per Date
  • Status Count
  • Transition Count

You can view data as a Table or Chart. And use a Pivot to customize your reports as you need.

Moreover, you can export all necessary data as a report in XLS or CVS files and set up a teamwork schedule to exclude non-working hours or days. Based on this extracted custom report you can proceed with your corporate analysis.

The add-on is constantly improving. Hope, that the new Time in Status for Jira Cloud will help you to create the reports you need.

Try an online demo to understand better how it works without installing.

Best regards,
Julia
SaaSJet

4 votes
Mehmet A _Bloompeak_
Atlassian Partner
April 29, 2020

Hi there,

There is the limited but free add-on Status Time Free. It displays time spent on each status on issue screen view.

IssueScreenView-4.gif

3 votes
Sanjay Dhandare
Contributor
February 11, 2020

Hi @Pooja ,

Hope this will help you !

Create one script field and comment the Mutable issue and you will get the required answer 

Note : If it solved your problem then please accept the solution ! Happy Coding

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.history.ChangeItemBean
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.core.util.DateUtils

def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()

IssueManager im = ComponentAccessor.getIssueManager()

MutableIssue issue = im.getIssueObject("TES-9")  ##getting issue 

def StatusName = "To Do" ## for To Do status

def timeNow = System.currentTimeMillis();

List<Long> rt = [0L]

def changeItems = changeHistoryManager.getChangeItemsForField(issue, "status")

def statusChanged = changeItems.size() != 0;

def currentStatusName = issue.getStatus().getName();

log.warn(" Status = "+currentStatusName)

if(!statusChanged && currentStatusName == StatusName)
{

def timeDiff = timeNow - issue.getCreated().getTime();

rt << timeDiff;
}

def changesCount = 0;

changeItems.each { ChangeItemBean item ->

def timeDiff = timeNow - item.created.getTime();

if ((item.fromString == StatusName))
{
if(changesCount == 0)
{
rt << item.created.getTime() - issue.getCreated().getTime();
}
else
{
rt << -timeDiff
}
}
if(item.toString == StatusName)
{
rt << timeDiff
}

changesCount++;
}

def total = rt.sum() /1000 as Long

def mytotal =DateUtils.getDurationString(total)

log.warn("Time Spent In Given Status == "+mytotal)

return mytotal as String ?: 0L

Ganga Bopaiah July 21, 2022

worked for me, Thanks :)

Amit Kumar Singh
Contributor
January 12, 2023

 

This is very helpful, but i am getting only 0m, for every issue..

 

image.pngimage.png

3 votes
Michael Boumansour
Contributor
February 26, 2019

I developed a tool in Google Sheets that allows you to do exactly that.  I made the tool freely available.  Here is my blog post that provides the details.

laralg
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.
February 27, 2019

Amazing Michael! 

Michael Boumansour
Contributor
February 27, 2019

Thank you Lara!

Yolanda Repetto-Logan April 2, 2019

Looks very comprehensive. I don't know that I can use it for security reasons. Does the resource access save the JIRA creds, or each time I initialize does it calls the creds I specify? 

Michael Boumansour
Contributor
July 17, 2019

@Yolanda Repetto-Logan , sorry I did not see your question. The creds are saved in the User Properties of the Google Sheet so only that specific user has access to them.

Carrie Hunt
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 15, 2020

Having difficulties even getting the EJQL tool to connect to my jira instance - we just moved our instance behind IAP from GCP and top it with Okta for managing logins.  The only error I get everytime I do anything that requires touching JIRA is an error message that says "SyntaxError: Unexpected token: <" and I don't know what to do with that.

Michael Boumansour
Contributor
July 15, 2020

The EJQT uses basic authentication. It does not have an option for SSL unfortunately.

Sunil Kirangi December 8, 2021

Hi Michael,

I was really impressed with the tool and its featuresEJQL.PNG but i am not sure this is compatible with Server version of JIRA, i could not able to authenticate for Filters, do we need to configure API details in App configurations,

Can you please help me with this issue.

Thanks

Sunil Kirangi

Caroline Calhoun January 31, 2022

Michael,

Thank you so, SO much for the tool, for the documentation, and for making it available. I spent days banging my head against a wall trying to figure out cycle times and in desperation finally found this thread just as I was ready to give up. My team owes you a debt of gratitude for providing us with these insights.

Thank you thank you thank you!

Like Mahesh Kallepalli likes this
2 votes
Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 21, 2018

Nope. Unfortunately without addons (or development) this is not possible to achieve in JQL (or in JIRA)

Rahul_RVS
Atlassian Partner
May 16, 2021

Hi

If you would be interested in a ready made solution, You may want to try out the plugin, Agile Tools : Epic Tree & Time in Status 

It provides 3 major functionalities in one add-on

  • More than 7 types of Time in Status Reports
    • Time in Status
    • Time with Assignee
    • Time in Status with Assignee
    • Time with Assignee per Status
    • Status/Assignee Count
    • Multiple Transition Reports
    • Avg Time reports
  • Epic Hierarchy / Sum Up (Standard Jira Hierarchy Epic -> Story -> SubTask)
  • Link Hierarchy / Sum Up (Hierarchy based on your issue link, upto 10 level deep)

TIS-5-Apr.PNG

1 vote
Aleksandar Salevski August 13, 2021

Hi ,

Is there a way to do this with, AIO reports?

1 vote
Swapan Swaroop July 14, 2021

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question