5.7.217. Bugzilla::Extension::RuleEngine::RuleState

5.7.217.1. NAME

Bugzilla::Extension::RuleEngine::RuleState - Bugzilla Rule State class.

5.7.217.2. SYNOPSIS

use Bugzilla::Extension::RuleEngine::RuleState;

my $rule_state = new Bugzilla::Extension::RuleEngine::RuleState(1);

my $id            = $rule_state->id;
my $when_disabled = $rule_state->when_disabled;
my $disabled_by   = $rule_state->disabled_by;
my $reason        = $rule_state->reason;
my $when_enabled  = $rule_state->when_enabled;
my $enabled_by    = $rule_state->enabled_by;

5.7.217.3. DESCRIPTION

Bugzilla::Extension::RuleEngine::RuleState represents an entry in the Rules Engine state table. If there are any rows where when_enabled is not set, the Rules Engine will not be run. 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::RuleState are listed below.

Note that the meaning of disabled and enable is in relation to the Rules Engine itself, not the state of the kill switch (which is the opposite)

5.7.217.4. METHODS

  • enable
  • Description
Changes the switch to enabled. This is used to ensure both enabled values are set correctly (since there is not set_ subs)
  • Params
none.
  • Returns
nothing.
  • disabled_user
  • Description
The person that disabled the Rules Engine.
  • Params
none.
  • Returns
A Bugzilla::User object.
  • enabled_user
  • Description
The person that enabled the Rules Engine.
  • Params
none.
  • Returns
A Bugzilla::User object.
  • active_list
  • Description
Returns all state rows which result in the BRE being disabled
  • Params
none.
  • Returns
  • previous_list
  • Description
Returns the ten most recent state rows (currently active first)
  • Params
none.
  • Returns
  • disabled_count
  • Description
Returns the number of rows where the Rules Engine is disabled
  • Params
  • $rule_group_id (optional).
The RuleGroup id to limit the count to.
  • Returns
An integer.

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