From: lpsolit%gmail.com <> Date: Tue, 31 Oct 2006 07:49:48 +0000 (+0000) Subject: Bug 357374: Can't locate object method "use_for" via package "Bugzilla::Group" -... X-Git-Tag: bugzilla-2.23.4~246 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ebf812b9a5378b6920b04604273aaf9b5df6ac7;p=thirdparty%2Fbugzilla.git Bug 357374: Can't locate object method "use_for" via package "Bugzilla::Group" - Patch by Frédéric Buclin r=kiko a=myk --- diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm index 69c3f51dea..0f7771efe6 100644 --- a/Bugzilla/Group.pm +++ b/Bugzilla/Group.pm @@ -71,6 +71,11 @@ sub is_active { return $_[0]->{'isactive'}; } #### Methods #### ############################### +sub is_active_bug_group { + my $self = shift; + return $self->is_active && $self->is_bug_group; +} + sub _rederive_regexp { my ($self) = @_; RederiveRegexp($self->user_regexp, $self->id); @@ -206,6 +211,7 @@ Bugzilla::Group - Bugzilla group class. my $description = $group->description; my $user_reg_exp = $group->user_reg_exp; my $is_active = $group->is_active; + my $is_active_bug_group = $group->is_active_bug_group; my $group_id = Bugzilla::Group::ValidateGroupName('admin', @users); my @groups = Bugzilla::Group->get_all; diff --git a/template/en/default/admin/groups/list.html.tmpl b/template/en/default/admin/groups/list.html.tmpl index 9f4f129c45..617bbd3c1a 100644 --- a/template/en/default/admin/groups/list.html.tmpl +++ b/template/en/default/admin/groups/list.html.tmpl @@ -52,7 +52,7 @@ {name => 'userregexp' heading => 'User RegExp' } - {name => 'use_for' + {name => 'is_active_bug_group' heading => "Use For $terms.Bugs" align => 'center' } @@ -66,15 +66,15 @@ ] %] -[% overrides.use_for = [ { +[% overrides.is_active_bug_group = [ { match_value => "0" - match_field => 'use_for' + match_field => 'is_active_bug_group' override_content => 1 content => " " }, { match_value => "1" - match_field => 'use_for' + match_field => 'is_active_bug_group' override_content => 1 content => "X" }] @@ -130,10 +130,6 @@ }] %] -[% FOREACH group = groups %] - [% group.use_for = (group.isactive != 0) && (group.isbuggroup) %] -[% END %] - [% PROCESS admin/table.html.tmpl columns = columns data = groups