summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Component.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-09-21 06:57:57 +0200
committermkanat%bugzilla.org <>2006-09-21 06:57:57 +0200
commitc6433b10999a9bfe1f26bea4deaba11db3251fc0 (patch)
tree49a274adb031a18a9b3bd7f2641cc9d92a9f5449 /Bugzilla/Component.pm
parentf90a0b775e927aad00631ce80d282186a3022af5 (diff)
downloadbugzilla-c6433b10999a9bfe1f26bea4deaba11db3251fc0.tar.gz
bugzilla-c6433b10999a9bfe1f26bea4deaba11db3251fc0.tar.xz
Bug 38922: Default (Initial) CC list for each component
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'Bugzilla/Component.pm')
-rw-r--r--Bugzilla/Component.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm
index abd3711f5..4b9856feb 100644
--- a/Bugzilla/Component.pm
+++ b/Bugzilla/Component.pm
@@ -14,6 +14,8 @@
#
# Contributor(s): Tiago R. Mello <timello@async.com.br>
# Frédéric Buclin <LpSolit@gmail.com>
+# Max Kanat-Alexander <mkanat@bugzilla.org>
+# Akamai Technologies <bugzilla-dev@akamai.com>
use strict;
@@ -154,6 +156,21 @@ sub flag_types {
return $self->{'flag_types'};
}
+sub initial_cc {
+ my $self = shift;
+
+ my $dbh = Bugzilla->dbh;
+
+ if (!defined $self->{'initial_cc'}) {
+ my $cc_ids = $dbh->selectcol_arrayref(
+ "SELECT user_id FROM component_cc WHERE component_id = ?",
+ undef, $self->id);
+ my $initial_cc = Bugzilla::User->new_from_list($cc_ids);
+ $self->{'initial_cc'} = $initial_cc;
+ }
+ return $self->{'initial_cc'};
+}
+
###############################
#### Accessors ####
###############################
@@ -212,6 +229,7 @@ Bugzilla::Component - Bugzilla product component class.
my $product_id = $component->product_id;
my $default_assignee = $component->default_assignee;
my $default_qa_contact = $component->default_qa_contact;
+ my $initial_cc = $component->initial_cc
my $bug_flag_types = $component->flag_types->{'bug'};
my $attach_flag_types = $component->flag_types->{'attachment'};
@@ -273,6 +291,11 @@ Component.pm represents a Product Component object.
Returns: A Bugzilla::User object.
+=item C<initial_cc>
+
+Returns an arrayref of L<Bugzilla::User> objects representing the
+Initial CC List.
+
=item C<flag_types()>
Description: Returns all bug and attachment flagtypes available for