How can I collect the bug age for 'non-closed' status?

dana cai June 12, 2016

For example, we have 1000 bugs in the jira, and I want to know how many defects be in opened status for the long time like more than 1 month? somehting like that.
And the import thing what I want to do is: I want to filter out them, and order by bug opened age, that it means, we have like one table the x(line) is bug age, the y(column) is bugID.
--> The result I would like to see, like the openned age of bug 2234 is 2 weekys, bug 2289 is 1 week...

Looking forward to get your feedback, thanks a lot!

Regards
Dana Cai

3 answers

1 vote
Shamith Shankar June 13, 2016

i had similar requirement . Did it using script runner plugin. added Scripted Field with below script.
it tracks from created date to resolved date.. 

Long sourceDate= new Date().time
        if(issue.getResolutionDate()!=null){
          sourceDate = issue.getResolutionDate().time
        }
        long diff = Math.abs(sourceDate - issue.getCreated().time)
        long diffDays = (diff + 12 * 60 * 60 * 1000) / (24 * 60 * 60 * 1000)
        def fvalue= diffDays.intValue()
return fvalue as Double
dana cai June 13, 2016

does above can be worked by you?

if yes, could you share with me the detail steps, thanks.

dana cai June 13, 2016

OK, thank you, I can try it.

1 vote
Mahesh S
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 12, 2016

Please use the below mentioned JQL for filtering the issues based on open status and sort it by the created date.

status in (Open, "In Progress") order by created asc

Here, Please add the extra conditions as required like <Project=''>, <assignee=''>,..

Add all the required non closed statuses like open, 'In progress', Addressed and so on in the IN operators braces as seen. Please replace it with <status = open> if you prefer only the bugs in open status specifically.

When the results are displayed, click on Columns-> Filter in the issue navigator, just above the results displayed. Mark 'Key' and 'Created' alone, so that you will get the results with the y(column) as bugID and x(line) as bug age, in the order of creation date. Please drag x and y columns to get what you needs as mentioned in your question.

0 votes
dana cai June 12, 2016

hi, thank you for your feedback, this is great solution, however I would like to say this is one workaround to filter out them.

So the further question from me is: can we auto count the age for them, now - created date. and generate as one table that I can see it in the gadget to add it into my dashboard for team view.

Thank you!

 

Dana

Mahesh S
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 13, 2016

I tried it with a filter results gadget in the dashboard, as seen in the pic below.

Untitled.jpg

Is this what you needed? However, I couldn't understand how can we add the created date.

dana cai June 13, 2016

 

 

Hi Mahesh,

Thank you for your feedback.

what I ask for should like below table, I need to know the age of issue be lived - not closed.

image2016-6-14 11:24:23.png

 

Regards

Dana Cai

Mahesh S
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 13, 2016

These dashboards actually works from JQLs. There is no in built JIRA field to calculate this field. However, we will be able to calculate via a scripted field. But I'm unsure whether that scripted field value could be displayed in the issue navigator.

Suggest an answer

Log in or Sign up to answer