]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 357374: Can't locate object method "use_for" via package "Bugzilla::Group" -...
authorlpsolit%gmail.com <>
Tue, 31 Oct 2006 07:49:48 +0000 (07:49 +0000)
committerlpsolit%gmail.com <>
Tue, 31 Oct 2006 07:49:48 +0000 (07:49 +0000)
Bugzilla/Group.pm
template/en/default/admin/groups/list.html.tmpl

index 69c3f51deaf7be829f15034158ccb01e81e4c7b1..0f7771efe61a510fa039d02cd984c0a337f850f1 100644 (file)
@@ -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;
index 9f4f129c4555e36a0e3513cb6c2617dbc6c48c71..617bbd3c1af83a96e6c6993574bc7f1ef64d7476 100644 (file)
@@ -52,7 +52,7 @@
    {name               => 'userregexp'
     heading            => 'User RegExp'
    }
-   {name               => 'use_for'
+   {name               => 'is_active_bug_group'
     heading            => "Use For $terms.Bugs"
     align              => 'center'
    }
   ]
 %]
 
-[% 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 => "&nbsp;"
    },
    {
      match_value => "1"
-     match_field => 'use_for'
+     match_field => 'is_active_bug_group'
      override_content => 1
      content => "X"
    }]
    }]
 %] 
 
-[% FOREACH group = groups %]
-  [% group.use_for = (group.isactive != 0) && (group.isbuggroup) %]
-[% END %]
-
 [% PROCESS admin/table.html.tmpl
   columns = columns
   data    = groups