5.7.215. Bugzilla::Extension::RuleEngine::RuleDetail

5.7.215.1. NAME

Bugzilla::Extension::RuleEngine::RuleDetail - Bugzilla Rule Detail class.

5.7.215.2. SYNOPSIS

use Bugzilla::Extension::RuleEngine::RuleDetail;

my $rule_detail = new Bugzilla::Extension::RuleEngine::RuleDetail(1);

my $id          = $rule_group->id;
my $rule_id     = $rule_group->rule_id;
my $creation_ts = $rule_group->creation_ts;
my $is_active   = $rule_group->is_active;

5.7.215.3. DESCRIPTION

Bugzilla::Extension::RuleEngine::RuleDetail represents a version of a rule object. It is an implementation of Bugzilla::Object, and thus provides all methods that Bugzilla::Object provides.

The methods that are specific to Bugzilla::Extension::RuleEngine::RuleDetail are listed below.

5.7.215.4. METHODS

  • creator
  • Description
The person that created this version of the rule
  • Params
none.
  • Returns
A Bugzilla::User object.
  • rule
  • Description
Returns the rule that this detail belongs to.
  • Params
none.
  • Returns
  • match
  • Description
Returns the details of the criteria to match a bug against this version of a rule
  • Params
none.
  • Returns

A hash with the following keys:

  • custom (array of hashes) Reflects custom searches. The keys will be:

negate (boolean): Whether the search is negated field (string): The fielddefs.name being searched on (only selected values are allowed) op (string): The operation to be performed. A sub set of the official list is supported value (string): The value to search for. (can be empty if op is ‘null’ or ‘notnull’)

  • flag_types (array of hashes)
Each hash has two keys name (string): the flag type name status (array of strings): status to match for. One or more of: X, ?, + or -
  • flag_groups (array of hashes) Each hash has three keys id (integer): the flag group id word (string): ‘any’ or ‘all’.

If all, all flags matches by the group must be set to one of the status(es) status (array of strings): status to match for. One or more of: X, ?, + or -

  • anything else is a field name which is a hash with one or two keys>

values (array of strings): Values to match (e.g. product names) word (string): One of ‘is any of’, ‘is all of’ or ‘is not any of’. If not specified then ‘is any of’ is assumed.

  • action
  • Description
Returns the details of what changes to make if the rule detail is successfully matched
  • Params
none.
  • Returns

A hash with the following keys:

  • bug_status / resolution / target_milestone / component (string) The new value for the respective field
  • keywords / target_release (hash)
Two keys. action is ‘set’, ‘add’ or ‘remove’, values is an array of strings with the value(s) to set, add or remove
  • flag_types (hash of hashes)
The flags that need to be updated. The key is the flag type name, the value is a hash with two keys, condition and status. condition is NULL for always change, ‘Exists’ to check that the flag exists, or a combination of ‘X?+-‘ to check the current status. status is the new status of the flag.
  • comment (hash)
A comment to be made. Keys are ‘private’ (1 or 0) and text (the text of the comment).
  • notify (string)
The e-mail address(es) to send a notification to.

This documentation undoubtedly has bugs; if you find some, please file them here.