From c6433b10999a9bfe1f26bea4deaba11db3251fc0 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 21 Sep 2006 04:57:57 +0000 Subject: Bug 38922: Default (Initial) CC list for each component Patch By Max Kanat-Alexander r=LpSolit, a=myk --- Bugzilla/Component.pm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'Bugzilla/Component.pm') 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 # Frédéric Buclin +# Max Kanat-Alexander +# Akamai Technologies 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 + +Returns an arrayref of L objects representing the +Initial CC List. + =item C Description: Returns all bug and attachment flagtypes available for -- cgit v1.2.3-24-g4f1b