tags:

views:

72

answers:

2

We're using bugzilla and I would like to add a column to a list view to see the last timestamp when the bug's state was set to resolved or closed. Is this possible and if so, how? If not, what's the closest I can have to this?

Using Bugzilla v3.2.3.

+1  A: 

Looks like the closest you can get is the "Changed" column. Unfortunately, that updates even when comments are added.

Nader Shirazie
That's what I found too. Just wondering if I was missing something obvious. Thanks.
romkyns
You *could* try running searches to see which bugs changed to resolved status on some particular date. That would be horrible and painful however. The data is obviously there...
Nader Shirazie
+2  A: 

It's not super pretty and easy, but this query will give you the bug ID and the timestamp for the most recent time when the bug was changed to RESOLVED. You could adapt this for CLOSED as well, I am sure. If you wanted access to this information from within the Bugzilla user interface, then you would need to modify the code for your Bugzilla installation to expose this information.

select bugs.bug_id, bugs_activity.bug_when as 'Resolved'
from bugs
left join bugs_activity on     bugs.bug_id = bugs_activity.bug_id
                           and bugs_activity.fieldid=9
                           and bugs_activity.added='RESOLVED'
                           and bugs_activity.bug_when = (select max(a.bug_when)
                                                         from bugs_activity a
                                                         where a.bug_id = bugs.bug_id
                                                           and a.fieldid=9
                                                           and a.added='RESOLVED')
Scott W
Thanks for the effort, unfortunately I have no access to the database or the source code of the installation.
romkyns