I need a mechanism to capture the amount of time a ticket spent in the Clarification needed status in Jira server
Hi @Dayanand
You could do this with (including some qualifiers about the method):
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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:
https://marketplace.atlassian.com/1211756
EmreT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.