numerous fixes

git-svn-id: svn://10.0.0.236/trunk@227552 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ghendricks%novell.com
2007-06-05 21:11:53 +00:00
parent 0756dfc6a7
commit aa5d8576ef
14 changed files with 34 additions and 50 deletions

View File

@@ -397,7 +397,7 @@ the page navigation links to move from page to page.
sub get_page_url {
my $self = shift;
my $cgi = $self->{'cgi'};
return $self->{'url_loc'} ."?". $cgi->canonicalise_query('page', 'pagesize');
return $self->{'url_loc'} ."?". $cgi->canonicalise_query('page', 'pagesize', 'viewall');
}
sub get_url {

View File

@@ -369,7 +369,6 @@ sub set_status {
}
my $note = "Status changed from $oldstatus to $newstatus by ". Bugzilla->user->login;
$note .= " for build '". $self->build->name ."' and environment '". $self->environment->name;
$self->append_note($note);
$self->{'case_run_status_id'} = $status_id;
$self->{'status'} = undef;
@@ -381,8 +380,8 @@ sub set_sortkey {
my $dbh = Bugzilla->dbh;
$dbh->do("UPDATE test_case_runs SET sortkey = ?
WHERE case_id = ? AND run_id = ?",
undef, ($sortkey, $self->case_id, $self->run_id));
WHERE case_run_id = ?",
undef, ($sortkey, $self->id));
}
@@ -404,8 +403,6 @@ sub set_assignee {
my $note = "Assignee changed from $oldassignee to ". $newassignee->login;
$note .= " by ". Bugzilla->user->login;
$note .= " for build '". $self->build->name;
$note .= "' and environment '". $self->environment->name;
$self->append_note($note);
}
@@ -761,9 +758,8 @@ sub notes {
my $notes = $dbh->selectcol_arrayref(
"SELECT notes
FROM test_case_runs
WHERE case_id = ? AND run_id = ?
ORDER BY case_run_id",
undef,($self->case_id, $self->run_id));
WHERE case_run_id = ?",
undef,($self->id));
return join("\n", @$notes);
}

View File

@@ -38,6 +38,10 @@
[% END %]
[%############################################################################%]
[%# Block for Navigation Links #%]
[%############################################################################%]
[% BLOCK navigation %]
[% SET MAX_LIMIT = 10000 %]
[% IF ajax %]
@@ -47,6 +51,7 @@
[% url = "$table.get_page_url&pagesize=$table.page_size&page="%]
[%# url = "$table.url_loc?direction=$direction&getlist=1&page="%]
[% END %]
[% IF NOT table.viewall %]
[% pagesizelist = [{name => 25, id => 25},
{name => 50, id => 50},
{name => 100, id => 100},
@@ -134,7 +139,7 @@
[% IF ajax %]
<a href="[% url %]null,1[% pc %]">View&nbsp;All</a>&nbsp;
[% ELSE %]
[% IF table.list_count < MAX_LIMIT %]
[% IF table.list_count < MAX_LIMIT AND table.list_count > table.page_size %]
<a href="[% url %]&viewall=1">View&nbsp;All</a>&nbsp;
[% ELSE %]
<span style="color:gray">View&nbsp;All</span>
@@ -145,4 +150,12 @@
</tr>
<tr><th colspan="5" style="font-size: 12pt;">[% table.list_count %] records found [% '(filtered)' IF filtered %]</th></tr>
</table>
[% ELSE %]
<table align="center">
<tr style="background-color: #eeeeee; ">
<td align="center"><a href="[% url %]0">Paged View</a></td>
</tr>
<tr><th colspan="5" style="font-size: 12pt;">[% table.list_count %] records found [% '(filtered)' IF filtered %]</th></tr>
</table>
[% END %]
[% END %]

View File

@@ -128,7 +128,7 @@
</tr>
<tr>
<th align="right"><a href="tr_categories.cgi?plan_id=[% case.plans.0.id %]" target="_blank">Category</a></td>
<th align="right"><a href="tr_categories.cgi?product_id=[% case.plans.0.product.id %]" target="_blank">Category</a></td>
<td>
[% PROCESS select sel = { name => 'category',
accesskey => 'c',

View File

@@ -132,9 +132,7 @@ Select:
[% END %]
[% END %]
</table>
[% IF NOT table.viewall %]
[% PROCESS navigation %]
[% END %]
[% PROCESS navigation %]
[% DECORATIVE_BORDER_END %]
[%# No else clause required here -- see list.html.tmpl just below

View File

@@ -78,9 +78,7 @@ Select:
</td>
</tr>
[% END %]
[% IF NOT table.viewall %]
[% PROCESS navigation %]
[% END %]
[% PROCESS navigation %]
</table>
[% DECORATIVE_BORDER_END %]
[% ELSE %]

View File

@@ -61,7 +61,7 @@
<tr class="[% loop.count % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
<td colspan="13"><div style="margin-left:13px;margin-right:29px;"><b><a href="[% link %]summary" style="text-decoration:none;">Summary</a>:</b>&nbsp;
[% caserun.case.summary FILTER html %]</div></td></tr>
<tr id="head_caserun_[% index %]" class="[% loop.count % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
<tr id="head_caserun_[% index %]" class="[% loop.count % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]" dojoType="ContentPane">
[% PROCESS "testopia/caserun/short-form-header.html.tmpl" %]
</tr>
<tr class="[% loop.count % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
@@ -71,9 +71,7 @@
</tr>
[% END %]
[% IF NOT table.viewall %]
[% PROCESS navigation %]
[% END %]
</table>
[% DECORATIVE_BORDER_END %]

View File

@@ -48,9 +48,7 @@
</tr>
[% END %]
</table>
[% IF NOT table.viewall %]
[% PROCESS navigation %]
[% END %]
[% DECORATIVE_BORDER_END %]
<br>

View File

@@ -73,8 +73,6 @@ Select:
</tr>
</table>
[% IF NOT table.viewall %]
[% PROCESS navigation %]
[% END %]
[% DECORATIVE_BORDER_END %]
[% END %]

View File

@@ -97,7 +97,6 @@
id="environment"
name="environment"
maxListLength="10"
style="width:200px; height:15px"
value="[% run.environment.id FILTER none %]" >
[% IF action == 'Add' %]
<b>or New:</b> <input name="new_env">
@@ -107,13 +106,13 @@
</tr>
<tr>
<th align="right">Summary</th>
<td colspan="3"><input type="text" size="110" name="summary" value="[% run.summary FILTER html %]"></td>
<td colspan="3"><input type="text" name="summary" value="[% run.summary FILTER html %]" style="width: 600px"></td>
</tr>
<tr>
<th align="right" valign="top">Notes:</th>
<td colspan="5">
<textarea rows="15" cols="80" name="notes">
<textarea rows="15" cols="80" name="notes" style="width: 600px">
[% run.notes FILTER none %]
</textarea>
</td>

View File

@@ -46,7 +46,8 @@
<script type="text/javascript">
djConfig = {
parseWidgets: false,
searchIds: ["manager","percent_bar","environment","caserun_env","tags","newtag","tagTable","tip_[% run.id FILTER none %]","caseruns_table"]
searchIds: ["manager","percent_bar","environment","caserun_env","tags","newtag","tagTable","tip_[% run.id FILTER none %]","caseruns_table",[% FOREACH cr = table.list %]"head_caserun_[% loop.count %]"[%',' UNLESS loop.last %][% END %]]
};
</script>
<script src="testopia/js/util.js" type="text/javascript"></script>
@@ -174,6 +175,7 @@
<h3>Test Case Run Logs</h3><a name="table" />
[% PROCESS testopia/caserun/filter.html.tmpl %]
<br/>
[% IF run.canedit %]
<form action="tr_show_run.cgi" method="post">
<table>
<tr class="bz_row_header">
@@ -184,15 +186,12 @@
<tr>
<td><input name="newcases"></td>
<td align="right" valign="top">
[% IF run.canedit %]
[% PROCESS select sel = { name => "caserun_build",
list => run.plan.product.builds(1),
}
%]
[% END %]
</td>
<td align="left" valign="top">
[% IF run.canedit %]
<input dojoType="select"
dataUrl="tr_quicksearch.cgi?action=getenv&prod_id=[% run.plan.product.id FILTER none %]&search=${searchString}"
mode="remote"
@@ -200,18 +199,18 @@
name="caserun_env"
id="caserun_env"
maxListLength="10">
[% END %]
</td>
</tr>
<tr>
<td align="right" colspan="3">
<input type="submit" name="action" id="action" value="New Case-Run" />
<input type="hidden" name="run_id" value="[% run.id FILTER none %]">
or <a href="tr_list_cases.cgi?run_id=[% run.id FILTER none %]&update_build=1">Add several at once</a>
or <a href="tr_list_cases.cgi?addrun=[% run.id FILTER none %]&run_id=[% run.id FILTER none %]">Add several at once</a>
</td>
</tr>
</table>
</form>
[% END %]
[% PROCESS testopia/caserun/table.html.tmpl %]
[% table.list_count FILTER none %] test cases found.

View File

@@ -72,9 +72,7 @@ Select:
[% IF NOT plan %]<td align="left"><a href="tr_show_plan.cgi?plan_id=[% run.plan.id FILTER none %]">[% run.plan.id FILTER html %]</a></td>[% END %]
</tr>
[% END %]
[% IF NOT table.viewall %]
[% PROCESS navigation %]
[% END %]
</table>
[% DECORATIVE_BORDER_END %]

View File

@@ -206,9 +206,7 @@ function chOwn(idx, cid, owner){
function chSortKey(idx, cid, svalue){
displayMsg('pp'+idx, 3, MSG_WAIT.blink());
disableAllButtons(true);
document.getElementById('ra'+idx).style.display='block';
document.getElementById('id'+idx).src='testopia/img/td.gif';
dojo.io.bind({
url: "tr_show_caserun.cgi",
content: { caserun_id: cid, index: idx, sortkey: svalue, action: 'update_sortkey'},

View File

@@ -92,18 +92,7 @@ if ($action eq 'Commit'){
push @uneditable, $run;
next;
}
my $error_mode_cache = Bugzilla->error_mode;
Bugzilla->error_mode(ERROR_MODE_DIE);
eval{
login_to_id(trim($cgi->param('manager')));
};
Bugzilla->error_mode($error_mode_cache);
if ($@){
print $cgi->multipart_end if $serverpush;
}
my $manager = login_to_id(trim($cgi->param('manager')));
trick_taint($manager);
if ($cgi->param('manager') && !$manager){
print $cgi->multipart_end if $serverpush;
@@ -145,9 +134,11 @@ if ($action eq 'Commit'){
print $cgi->multipart_start;
}
my $run = Bugzilla::Testopia::TestRun->new({});
my $updated = $i - scalar @uneditable;
$vars->{'run'} = $run;
$vars->{'title'} = $i ? "Update Successful" : "Nothing Updated";
$vars->{'tr_message'} = "$i Test Runs Updated" if $i;
$vars->{'tr_error'} = "You did not have rights to edit ". scalar @uneditable . "runs" if scalar @uneditable > 0;
$vars->{'tr_message'} = "$updated Test Runs Updated";
$vars->{'current_tab'} = 'run';
$vars->{'build_list'} = $run->get_distinct_builds();
$template->process("testopia/search/advanced.html.tmpl", $vars)