update multiple was setting the status when it shouldn't

links to csv were broken on opensource
removed unused file


git-svn-id: svn://10.0.0.236/trunk@217026 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ghendricks%novell.com 2006-12-15 19:49:55 +00:00
parent c6bdce8b5b
commit afe69a2f31
3 changed files with 9 additions and 107 deletions

View File

@ -305,13 +305,11 @@
<div id="buglist_actions">
<div class="links">
<span class="label">Export:</span>
<a href="tr_show_case.cgi?
&amp;case_id=[% case.id FILTER none %]&amp;ctype=csv"><image src="images/csv.png" class="image"></a>
[%# <img src="https://secure-www.novell.com/img/link_divbar.gif" width="1" height="20" alt="line" class="bar"> #%]
[%# <a href="tr_list_cases.cgi? #%]
[%# &amp;ctype=xml"><image src="images/xml.png" class="image"></a> #%]
<a href="tr_show_case.cgi?case_id=[% case.id FILTER none %]&amp;ctype=csv"><image src="testopia/img/csv.png" class="image"></a>
[%# <a href="tr_list_cases.cgi?ctype=xml"><image src="images/xml.png" class="image"></a> #%]
</div>
</div>
[%##### Footer #####%]
[% PROCESS global/footer.html.tmpl %]

View File

@ -1,94 +0,0 @@
[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Test Runner System.
#
# The Initial Developer of the Original Code is Maciej Maczynski.
# Portions created by Maciej Maczynski are Copyright (C) 2001
# Maciej Maczynski. All Rights Reserved.
#
# Contributor(s): Greg Hendricks <ghendricks@novell.com>
#%]
[%# INTERFACE:
# ...
#%]
[%############################################################################%]
[%# Template Initialization #%]
[%############################################################################%]
[% PROCESS global/variables.none.tmpl %]
[% PROCESS testopia/blocks.html.tmpl %]
[% title = "Confirm Test Case-Run Update" %]
[%############################################################################%]
[%# Page Header #%]
[%############################################################################%]
[% PROCESS global/header.html.tmpl %]
[% PROCESS testopia/style.none.tmpl %]
<p>The build you selected already has a record in the database.</p>
<table style="border: 1px solid #000;">
<tr class="bz_row_header">
<th>Build</th>
<th>Assignee</th>
<th>Tested By</th>
<th>Close Date</th>
<th>Status</th>
</tr>
<tr>
<td>[% existing.build.name FILTER html %]</td>
<td>[% existing.assignee.login FILTER html %]</td>
<td>[% existing.testedby.login FILTER html %]</td>
<td>[% existing.close_date FILTER time %]</td>
<td>[% existing.status FILTER html %]</td>
</tr>
</table>
<p> Do you wish to over write this information with the following?</p>
<table style="border: 1px solid #000;">
<tr class="bz_row_header">
<th>Assignee</th>
<th>Tested By</th>
<th>Close Date</th>
<th>Status</th>
</tr>
<tr>
<td>[% assignee FILTER html %]</td>
<td>[% testedby FILTER html %]</td>
<td>[% close_date FILTER time %]</td>
<td>[% status_name FILTER html %]</td>
</tr>
</table>
<br/>
<form action="tr_show_caserun.cgi">
<b>Notes:</b><br/>
<textarea name="notes" cols="80" rows="15">[% notes FILTER none %]</textarea>
<input type="hidden" name="caserun_id" value="[% existing.id FILTER none %]">
<input type="hidden" name="confirm" value="1">
<input type="hidden" name="status" value="[% status FILTER none %]">
<input type="hidden" name="assignee" value="[% assignee FILTER none %]">
<input type="hidden" name="caserun_build" value="[% existing.build.id FILTER url_quote %]">
<input type="hidden" name="bugs" value="[% bugs FILTER none %]">
<input type="hidden" name="action" value="Commit">
<p>
<input type="submit" value="Yes">
</p>
</form>
<a href="tr_show_caserun.cgi?caserun_id=[% current.id FILTER none %]">No, take me back</a>
[% PROCESS global/footer.html.tmpl %]

View File

@ -99,9 +99,7 @@ if ($action eq 'Commit'){
|| ThrowTemplateError($template->error());
}
my $status = $cgi->param('status') == -1 ? $caserun->status_id : $cgi->param('status');
my $build = $cgi->param('caserun_build') == -1 ? $caserun->build->id : $cgi->param('caserun_build');
my $assignee = $cgi->param('assignee') eq '--Do Not Change--' ? $caserun->assignee->id : DBNameToIdAndCheck(trim($cgi->param('assignee')));
my $notes = $cgi->param('notes');
my $env = $cgi->param('caserun_env') eq '--Do Not Change--' ? $caserun->environment->id : $cgi->param('caserun_env');
@ -110,14 +108,9 @@ if ($action eq 'Commit'){
detaint_natural($env);
detaint_natural($build);
detaint_natural($status);
trick_taint($notes);
# If there is already a caserun with the selected build and environment,
# switch to it.
my $is = $caserun->check_exists($caserun->run_id, $caserun->case_id, $build, $env);
$caserun = Bugzilla::Testopia::TestCaseRun->new($is) if $is;
unless ($caserun->canedit){
print $cgi->multipart_end if $serverpush;
ThrowUserError("testopia-read-only", {'object' => 'Case Run', 'id' => $caserun->id});
@ -127,6 +120,11 @@ if ($action eq 'Commit'){
# If there is not one, it will create it and switch to that.
$caserun = $caserun->switch($build,$env);
my $status = $cgi->param('status') == -1 ? $caserun->status_id : $cgi->param('status');
my $assignee = $cgi->param('assignee') eq '--Do Not Change--' ? $caserun->assignee->id : DBNameToIdAndCheck(trim($cgi->param('assignee')));
detaint_natural($status);
$caserun->set_status($status) if ($caserun->status_id != $status);
$caserun->set_assignee($assignee) if ($caserun->assignee->id != $assignee);
$caserun->append_note($notes);