当错误标记为“已解决”时,如何自动将错误的受让人改回报告者?
我们有一个工作流程,其中所有传入的错误都被标记为已分配给其产品的默认受让人,然后它们保留在已分配状态,直到受让人解决为止。
此时,他们要么从“已解决”返回“已分配”(例如,尚未完成),要么在报告者满意后返回“已关闭”。
当第一个受让人将错误标记为“已解决”时,我们如何自动将错误的受让人更改为报告者?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
实际上,使用 Bugzilla hooks 非常容易。扩展代码需要放在哪里取决于您使用的版本,因为这是一项正在快速发展的功能。
在当前版本 Bugzilla 3.6.1 中,如果您想调用扩展
Local
,您需要创建一个文件extensions/Local/Extension.pm
。http://www.bugzilla.org/docs/ 3.6/en/html/api/Bugzilla/Extension.html是整个扩展系统的概述。
为此,您要使用的钩子是
bug_end_of_update
,它在对象更改后但写入数据库之前在Bugzilla/Bug.pm
中调用。对于您正在做的事情,您可能应该检查
changes
以查看bug_status
是否已更改。如果是这样,请更新bug
以将所有者设置为报告者,并将该更改添加到changes
。Bugzilla 的主要开发人员通常可以在 irc.mozilla.org 上的#mozwebtools 上找到,如果我的回答不足以让您感兴趣,请顺便与他们讨论细节。
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 fileextensions/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 inBugzilla/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 whetherbug_status
has changed. If so, updatebug
to set the owner to the reporter, and add that change tochanges
.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.
这将起作用:(CustomExtension.pm)
This will work: (CustomExtension.pm)