Fix build completion report. Open dashboard to non Testers.
git-svn-id: svn://10.0.0.236/trunk@250091 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -228,6 +228,25 @@ sub description { return $_[0]->{'description'};}
|
||||
sub milestone { return $_[0]->{'milestone'};}
|
||||
sub isactive { return $_[0]->{'isactive'};}
|
||||
|
||||
sub bugs {
|
||||
my $self = shift;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
return $self->{'bugs'} if exists $self->{'bugs'};
|
||||
my $ref = $dbh->selectcol_arrayref(
|
||||
"SELECT DISTINCT bug_id
|
||||
FROM test_case_bugs b
|
||||
JOIN test_case_runs r ON r.case_run_id = b.case_run_id
|
||||
WHERE r.build_id = ?",
|
||||
undef, $self->id);
|
||||
my @bugs;
|
||||
foreach my $id (@{$ref}){
|
||||
push @bugs, Bugzilla::Bug->new($id, Bugzilla->user->id);
|
||||
}
|
||||
$self->{'bugs'} = \@bugs if @bugs;
|
||||
$self->{'bug_list'} = join(',', @$ref);
|
||||
return $self->{'bugs'};
|
||||
}
|
||||
|
||||
sub product {
|
||||
my ($self) = @_;
|
||||
|
||||
|
||||
@@ -281,6 +281,14 @@ sub type {
|
||||
return $self->{'type'};
|
||||
}
|
||||
|
||||
sub canview {
|
||||
my $self = shift;
|
||||
my ($user) = @_;
|
||||
$user ||= Bugzilla->user;
|
||||
return 1 if $user->can_see_product($self->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub canedit {
|
||||
my $self = shift;
|
||||
my ($user) = @_;
|
||||
|
||||
@@ -821,17 +821,16 @@ Attaches the specified bug to this test case
|
||||
|
||||
sub attach_bug {
|
||||
my $self = shift;
|
||||
my ($bugids, $case_id) = @_;
|
||||
my ($bugids, $caserun_id) = @_;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
|
||||
$case_id ||= $self->{'case_id'};
|
||||
$bugids = $self->_check_bugs($bugids, "ATTACH");
|
||||
|
||||
$dbh->bz_lock_tables('test_case_bugs WRITE');
|
||||
|
||||
foreach my $bug (@$bugids){
|
||||
$dbh->do("INSERT INTO test_case_bugs (bug_id, case_run_id, case_id)
|
||||
VALUES(?,?,?)", undef, ($bug, undef, $self->id));
|
||||
VALUES(?,?,?)", undef, ($bug, $caserun_id, $self->id));
|
||||
}
|
||||
|
||||
$dbh->bz_unlock_tables();
|
||||
|
||||
Reference in New Issue
Block a user