Rules Engine in Bugzilla

Simon Green sgreen at
Fri Nov 9 12:13:13 UTC 2012

Hash: SHA256

Hi all,

For those that do not know me, I'm one of the developers for Red Hat
Bugzilla, and live and work in Brisbane. I hang out in #bugzilla with
the nick simon, and have submitted a couple of patches upstream.

As the second largest known Bugzilla installation, we have plenty of
customisations. One thing I am considering is some sort of 'rules
engine' that runs after bugs are created or updated.

Examples of rules would be:
If the bug has flagA+ and flagB+, set flagC to +, and make a comment
If product is I or J, and component is K or L, add group M
If bug is in group X, add user Y to the CC: list

Up until now, we have been writing extension code using the
bug_end_of_update and bug_end_of_create hooks, and this is becoming a
bit unmaintainable.

The rules don't need to be run instantly, so I'm thinking about using
the job queue. I would store the bug id, whether it was a create or
update, user making the change or reporting the bug, and the timestamp
(so we wouldn't get hit by the issue of rows being added in the job
queue before the bug update is committed to the database).

I'm wondering if other Bugzilla installations have looked at some sort
of rules engine that takes a series of criteria and performs an action
if the bug matches the criteria?

Alternatively, does anyone know of a CPAN module that can be used to
define a set of rules. I'm sure something exists, but my Internet
searching isn't returning anything useful. Ideally it would work with
objects, so I can use any part of the Bugzilla::Bug object, and by
extension the Bugzilla::User of the reporter or the person making the

Any thoughts or wisdom shared is appreciated. Thanks in advance.

  -- simon
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the developers mailing list