From 0ce44681395c0a6ef5d8a54caa8aca73728b3b25 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Tue, 15 Mar 2005 13:20:47 +0000 Subject: Bug 285534: bugs.qa_contact should allow NULL Patch By Max Kanat-Alexander r=joel, a=justdave --- Bugzilla/Bug.pm | 2 +- Bugzilla/DB/Schema.pm | 2 +- Bugzilla/User.pm | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 62719de56..6c444a013 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -372,7 +372,7 @@ sub qa_contact () { my ($self) = @_; return $self->{'qa_contact'} if exists $self->{'qa_contact'}; - if (Param('useqacontact') && $self->{'qa_contact_id'} > 0) { + if (Param('useqacontact') && $self->{'qa_contact_id'}) { $self->{'qa_contact'} = new Bugzilla::User($self->{'qa_contact_id'}); } else { # XXX - This is somewhat inconsistent with the assignee/reporter diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 9a156a1b0..bf93914fc 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -145,7 +145,7 @@ use constant ABSTRACT_SCHEMA => { resolution => {TYPE => 'varchar(64)', NOTNULL => 1}, target_milestone => {TYPE => 'varchar(20)', NOTNULL => 1, DEFAULT => "'---'"}, - qa_contact => {TYPE => 'INT3', NOTNULL => 1}, + qa_contact => {TYPE => 'INT3'}, status_whiteboard => {TYPE => 'MEDIUMTEXT', NOTNULL => 1, DEFAULT => "''"}, votes => {TYPE => 'INT3', NOTNULL => 1, diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 36179fcce..63b2f6848 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -359,7 +359,8 @@ sub can_see_bug { $sth->finish; $self->{sthCanSeeBug} = $sth; return ( (($reporter == $userid) && $reporter_access) - || (Param('useqacontact') && ($qacontact == $userid) && $userid) + || (Param('useqacontact') && $qacontact && + ($qacontact == $userid)) || ($owner == $userid) || ($isoncclist && $cclist_access) || (!$missinggroup) ); -- cgit v1.2.3-24-g4f1b