зеркало из https://github.com/mozilla/pjs.git
Added reports of bugs associated with runs and plans.
This commit is contained in:
Родитель
8e05212f0c
Коммит
4fe0f64ddf
|
@ -1007,6 +1007,33 @@ sub builds {
|
|||
|
||||
}
|
||||
|
||||
=head2 bugs
|
||||
|
||||
Returns a reference to a list of Bugzilla::Bug objects associated
|
||||
with this plan
|
||||
|
||||
=cut
|
||||
|
||||
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
|
||||
JOIN test_cases ON test_case_bugs.case_id = test_cases.case_id
|
||||
JOIN test_case_plans ON test_case_plans.case_id = test_cases.case_id
|
||||
WHERE test_case_plans.plan_id = ?",
|
||||
undef, $self->id);
|
||||
my @bugs;
|
||||
foreach my $id (@{$ref}){
|
||||
push @bugs, Bugzilla::Bug->new($id, Bugzilla->user->id);
|
||||
}
|
||||
$self->{'bugs'} = \@bugs;
|
||||
$self->{'bug_list'} = join(',', @$ref);
|
||||
return $self->{'bugs'};
|
||||
}
|
||||
|
||||
=head2 product_name
|
||||
|
||||
Returns the name of the product this plan is associated with
|
||||
|
|
|
@ -912,7 +912,7 @@ sub bugs {
|
|||
my $dbh = Bugzilla->dbh;
|
||||
return $self->{'bugs'} if exists $self->{'bugs'};
|
||||
my $ref = $dbh->selectcol_arrayref(
|
||||
"SELECT bug_id
|
||||
"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.run_id = ?",
|
||||
|
@ -922,6 +922,7 @@ sub bugs {
|
|||
push @bugs, Bugzilla::Bug->new($id, Bugzilla->user->id);
|
||||
}
|
||||
$self->{'bugs'} = \@bugs;
|
||||
$self->{'bug_list'} = join(',', @$ref);
|
||||
return $self->{'bugs'};
|
||||
}
|
||||
|
||||
|
|
|
@ -254,10 +254,13 @@
|
|||
[%### Reports ###%]
|
||||
<br><br>
|
||||
<h3>Reports</h3>
|
||||
<a href="tr_plan_reports.cgi?plan_id=[% plan.id FILTER none %]&type=build_coverage">Build Coverage</a>
|
||||
<a href="tr_query.cgi?current_tab=plan&report=1">General Reports</a>
|
||||
<a href="tr_plan_reports.cgi?plan_id=[% plan.id FILTER none %]&type=build_coverage">Build Coverage</a><br/>
|
||||
<a href="tr_query.cgi?current_tab=plan&report=1">General Reports</a><br/>
|
||||
[% IF plan.bugs %]
|
||||
<a href="buglist.cgi?bug_id=[% plan.bug_list FILTER none %]">Bugs Found in this Plan</a><br>
|
||||
[% END %]
|
||||
[%##### Edit Plan #####%]
|
||||
<br><br>
|
||||
<br>
|
||||
[% IF plan.canedit %]
|
||||
<h3>Attributes</h3>
|
||||
<div id="edit_plan">
|
||||
|
|
|
@ -188,8 +188,11 @@
|
|||
[%##### Reports #####%]
|
||||
<br><br>
|
||||
<h3>Reports</h3>
|
||||
<a href="tr_query.cgi?current_tab=run&report=1">General Reports</a>
|
||||
<br><br>
|
||||
<a href="tr_query.cgi?current_tab=run&report=1">General Reports</a><br>
|
||||
[% IF run.bugs %]
|
||||
<a href="buglist.cgi?bug_id=[% run.bug_list FILTER none %]">Bugs Found in this Run</a><br>
|
||||
[% END %]
|
||||
<br>
|
||||
[%##### Categories and Tags #####%]
|
||||
<h3>CC, Coverage, Tags</h3>
|
||||
|
||||
|
|
|
@ -150,6 +150,7 @@ if ($action eq 'Commit'){
|
|||
$vars->{'run'} = $run;
|
||||
$vars->{'table'} = $table;
|
||||
$vars->{'action'} = 'Commit';
|
||||
$vars->{'backlink'} = $run;
|
||||
$vars->{'form_action'} = "tr_show_run.cgi";
|
||||
$template->process("testopia/run/show.html.tmpl", $vars) ||
|
||||
ThrowTemplateError($template->error());
|
||||
|
|
Загрузка…
Ссылка в новой задаче