From ccf50a2c6a7765bdec9d8b738367f93be679798c Mon Sep 17 00:00:00 2001 From: Koosha Khajeh Moogahi Date: Wed, 19 Sep 2012 21:11:15 +0200 Subject: Bug 445861: $component->default_qa_contact should not return the default user object when no default QA contact is defined r/a=LpSolit --- Bugzilla/Component.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Component.pm') diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index b8321cbf9..4491b48cf 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -352,6 +352,8 @@ sub default_assignee { sub default_qa_contact { my $self = shift; + return if !$self->{'initialqacontact'}; + if (!defined $self->{'default_qa_contact'}) { $self->{'default_qa_contact'} = new Bugzilla::User($self->{'initialqacontact'}); @@ -531,7 +533,8 @@ Component.pm represents a Product Component object. Params: none. - Returns: A Bugzilla::User object. + Returns: A Bugzilla::User object if the default QA contact is defined for + the component. Otherwise, returns undef. =item C -- cgit v1.2.3-24-g4f1b