tags:

views:

32

answers:

1

We have a workflow where all incoming bugs are marked ASSIGNED to their product's default assignee, then they stay in ASSIGNED until RESOLVED by the assignee.

At that point, they go either from RESOLVED back to ASSIGNED (e.g. not done yet) or to CLOSED once they reporter is satisfied.

How do we automatically change the assignee of the bug to the reporter when the first assignee marks it RESOLVED?

+1  A: 

Actually, this is pretty easy with Bugzilla hooks. Where the extension code needs to go will depend on what version you are using, because this is a capability that's rapidly developing.

In Bugzilla 3.6.1, the current version, if you wanted to call your extension Local, you would create a file extensions/Local/Extension.pm.

http://www.bugzilla.org/docs/3.6/en/html/api/Bugzilla/Extension.html is the overview of the whole extension system.

The hook you want to use for this is bug_end_of_update, which is called in Bugzilla/Bug.pm after the object is changed but before it is written to the database.

For what you're doing, you should probably check changes to see whether bug_status has changed. If so, update bug to set the owner to the reporter, and add that change to changes.

The main developers of Bugzilla can usually be found on #mozwebtools on irc.mozilla.org, drop in and chat them up about the particulars if my answer isn't enough to get you rolling.

David M