I need a mechanism to capture the amount of time a ticket spent in the Clarification needed status i

Dayanand June 18, 2021

I need a mechanism to capture the amount of time a ticket spent in the Clarification needed status in Jira server

4 answers

1 accepted

1 vote
Answer accepted
Bill Sheboy
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.
June 18, 2021

Hi @Dayanand 

You could do this with (including some qualifiers about the method):

  • easiest: the built-in control chart
  • most expensive cost: a marketplace addon for workflow measurement; scripted, calculated fields; or measurement dashboard gadgets
  • best way to understand what is measured: an automation rule with custom fields, capturing the entry/exit time for the status and subtracting to determine the difference

Best regards,

Bill

Dayanand June 20, 2021

@Bill Sheboy 

 

Thank you for such ideas

Like Bill Sheboy likes this
1 vote
Emre Toptancı _OBSS_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 18, 2021

Hello @Dayanand

For a ready-built solution that offers great flexibility and details, our team at OBSS built Time in Status. It is available for Jira Server, Cloud, and Data Center.

Time in Status mainly allows you to see how much time each issue spent on each status or assigned to each assignee. You can combine statuses in any way into consolidated columns to see metrics like Resolution Time or Ticket Age. You can calculate averages and sums of those durations grouped by issue fields you select. (For example see the monthly average Resolution Time per user, or weekly average Response Time per component, etc.). 

Time in Status can display its reports and charts in its own reporting page, in dashboard gadgets, and in a tab on issue view screens.

tisCloud_StatusDuration_LeadTime_with Estimates.png  tisCloud_StatusDuration_LeadTime_Average.png  tisCloud_StatusDuration_LeadTime_Chart.png

The app calculates its reports using already existing Jira issue histories so when you install the app, you don't need to add anything to your issue workflows and you can get reports on your past issues as well.

Using Time in Status you can:

  • See how much time each issue spent on each status, assignee, user group and also see dates of status transitions. Sort and Filter according to report values.
  • Calculate averages and sums of those durations grouped by issue fields you select. (For example, see average InProgress time per project and per issue type.)
  • Export your data as XLS, XLSX, or CSV.
  • Access data via REST API. (for integrations)
  • Visualize data with various chart types.
  • See Time in Status reports on Jira Dashboard gadgets 

https://marketplace.atlassian.com/1211756

EmreT

0 votes
Bloompeak Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 27, 2021

Hi @Dayanand ,

As an alternative, you can try Status Time app developed by our team. It provides reports on how much time passed in each status as well as status entry dates and status transition count.

Once you enter your working calendar into the app, it takes your working schedule into account too. That is, "In Progress" time of an issue opened on Friday at 5 PM and closed on Monday at 9 AM, will be a few hours rather than 3 days. It has various other reports like assignee time, status entry dates, average/sum reports(eg. average in progress time per project). And all these are available as gadgets on the dashboard too.

Here is the online demo link, you can see it in action and try.

If you are looking for a free solution, you can try the limited version Status Time Free. Hope it helps.

0 votes
Olga Videc
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 18, 2021

Hello @Dayanand 

You need duration filed,  you can achieve this by using the plugin ScriptRunner for example.

You install ScriptRunner then go to Apps - ScriptRunner - Console - Add custom filed

and then add this code to it, you need to add this field to the desired screens.

The code tested it works ;) using it daily.

 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue


def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()

def createDate = issue.getCreated().getTime();
def resolutionDate = issue.getResolutionDate()?.getTime();
if (resolutionDate == null) {
return null;
}
return (resolutionDate - createDate)/1000 as long;

 

BR, Olga

Dayanand June 18, 2021

@Olga Videc ,

above script gives timestamp between created and resolved but we are looking for amount of time spent in each status say how much time issue spent in open status how we can find this and export this report for management.

Rahul_RVS_Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 18, 2021

Hi @Dayanand 

If you would be interested in a third party solution, you may want to try out our plugin, Agile Tools : Epic Tree & Time in Status 

The add-on provides the time spent in each status for the entire lifecycle of the issue. You can also extract the transitions history of the issue. Along with various Issue stats reports, you get additional features like Epic Hierarchy & Links Hierarchy to track the project's progress. The main features are as below

  • More than 8 types of Time in Status Reports. Excel Export available for all 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.PNG

Olga Videc
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2021

Hello @Dayanand 

You would need to created separate custom filed for each status, I know it's lot of work but it works 

Example time spent in status "In Progress"

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.core.util.DateUtils
import com.atlassian.jira.issue.history.ChangeItemBean
import com.atlassian.jira.issue.Issue

def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()

def inProgressName = "In Progress"

List<Long> rt = [0L]
def changeItems = changeHistoryManager.getChangeItemsForField(issue, "status")
changeItems.reverse().each { ChangeItemBean item ->
def timeDiff = System.currentTimeMillis() - item.created.getTime()
if (item.fromString == inProgressName) {
rt << -timeDiff
}
if (item.toString == inProgressName) {
rt << timeDiff
}
}

def total = rt.sum() as Long
return (total / 1000) as long ?: 0L

 

SR duration.PNG

Suggest an answer

Log in or Sign up to answer