5.7.216. Bugzilla::Extension::RuleEngine::RuleGroup

5.7.216.1. NAME

Bugzilla::Extension::RuleEngine::RuleGroup - Bugzilla Rule Group class.

5.7.216.2. SYNOPSIS

use Bugzilla::Extension::RuleEngine::RuleGroup;

my $rule_group = new Bugzilla::Extension::RuleEngine::RuleGroup(1);
my $rule_group = new Bugzilla::Extension::RuleEngine::RuleGroup({name => 'Acme'});

my $id          = $rule_group->id;
my $name        = $rule_group->name;
my $description = $rule_group->description;
my $is_active   = $rule_group->is_active;

5.7.216.3. DESCRIPTION

Bugzilla::Extension::RuleEngine::RuleGroup represents a rule group 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::RuleGroup are listed below.

A Rule Group is a higher-level grouping of Rule (from the Bugzilla Rules Engine).

5.7.216.4. METHODS

  • rule_count
  • Description
Returns the total number of rules that belong to the rule group.
  • Params
none.
  • Returns
Integer - The total of rules inside the rule group.
  • sort_rules_by_group
  • Description
This is a helper which returns a list of rules sorted by rule group in a form suitable to be passed to the main rules page template.
  • Params
An arrayref of rule objects.
  • Returns

An arrayref of hashes suitable to be passed to template.

Each arrayref has two keys, object is the Bugzilla::Extension::RuleEngine::RuleGroup object, and rules are the list of rules (Bugzilla::Extension::RuleEngine::Rule object)

  • user_can_edit
  • Description
can the specified user edit this RuleGroup?
  • Params
Current logged in user is used if not given.
  • Returns
Boolean, true if user is allowed to edit the team.
  • classifications
  • Description
What classifications are using this BRE group?
  • Params
None.
  • Returns
An arrayref of Bugzilla::Classification objects.
  • remove_edit_group
  • Description
Removes a edit group from the team.
  • Params
  • $group Group object, name or id
  • Returns
Nothing.
  • add_edit_group
  • Description
Adds a new edit_group to the team.
  • Params
  • $group Group object, name or id
  • Returns
Nothing.
  • edit_groups
  • Description
List all edit groups for thie RuleGroup.
  • Params
None.
  • Returns
Array ref of Bugzilla::Group objects containing all edit groups.
  • view_groups
  • Description
List view groups for this RuleGroup.
  • Params
None.
  • Returns
An array ref of Bugzilla::Group objects.
  • add_view_group
  • Description
Adds a new view_group to the team.
  • Params
  • $group Group object, name or id
  • Returns
Nothing.
  • remove_view_group
  • Description
Removes a view group from the team.
  • Params
  • $group Group object, name or id
  • Returns
Nothing.
  • get_user
  • Description
Gets user object or throws error if user is not found. Without parameters returns the logged in user
  • Params
$user -> User ID or login name
  • Returns
  • get_group
  • Description
Gets group object or throws error if group is not found.
  • Params
$group -> Group ID or name
  • Returns
  • products
  • Description
What products are using this BRE group?
  • Params
None.
  • Returns
An array ref of Bugzilla::Product objects.
  • user_can_view
  • Description
Can the user view the RuleGroup and it’s Rules?
  • Params
Current logged in user is used if not given.
  • Returns
Boolean, true if user can view RuleGroup.

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