]> 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:51:53 +0000 (07:51 +0000)
committerlpsolit%gmail.com <>
Tue, 31 Oct 2006 07:51:53 +0000 (07:51 +0000)
Bugzilla/Group.pm
template/en/default/admin/groups/list.html.tmpl

index 32c4696db8dccae33be4c5378be58e01d5fba169..b2a5fd5c652407d0f66ba31580094f6030144ccb 100644 (file)
@@ -104,6 +104,15 @@ sub last_changed { return $_[0]->{'last_changed'}; }
 sub user_regexp  { return $_[0]->{'userregexp'};   }
 sub is_active    { return $_[0]->{'isactive'};     }
 
+###############################
+####        Methods        ####
+###############################
+
+sub is_active_bug_group {
+    my $self = shift;
+    return $self->is_active && $self->is_bug_group;
+}
+
 ################################
 #####  Module Subroutines    ###
 ################################
@@ -161,6 +170,7 @@ Bugzilla::Group - Bugzilla group class.
     my $last_changed = $group->last_changed;
     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::get_all_groups();
index e6d96b142d809e0a459f434933c8868300e4212e..82bd592fd57888b08ada61311fd625908e80e451 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