зеркало из https://github.com/mozilla/pjs.git
Added sortkey to caseruns table
This commit is contained in:
Родитель
1c867cd473
Коммит
91b023e49a
|
@ -397,6 +397,17 @@ sub set_status {
|
|||
$self->{'status'} = undef;
|
||||
}
|
||||
|
||||
sub set_sortkey {
|
||||
my $self = shift;
|
||||
my ($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));
|
||||
|
||||
}
|
||||
|
||||
=head2 set_assignee
|
||||
|
||||
Sets the assigned tester for the case-run
|
||||
|
|
|
@ -89,7 +89,7 @@ No test cases
|
|||
[% END %]
|
||||
found.</b>
|
||||
</p>
|
||||
[% IF table.list_count > 0 %]
|
||||
[% IF table.list_count > 0 && Param('allow-test-deletion') %]
|
||||
<p style="float: right;"><input type="submit" name="action" value="Delete Selected"></p>
|
||||
[% END %]
|
||||
[% IF dotweak AND table.list_count %]
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
</table>
|
||||
</td>
|
||||
<td align="left"><a href="tr_show_case.cgi?case_id=[% caserun.case.id FILTER none %]" title="[% caserun.case.summary FILTER html %]">[% caserun.case.id FILTER html %]</a></td>
|
||||
<td align="right"><input name="sortkey_[% index %]" id="sortkey_[% index %]" value="[% caserun.sortkey FILTER html %]" size="5"><input type="button" value="Change" onclick="chNote([% index %], [% caserun.id FILTER none %], document.getElementById('notes[% index %]').value); chSortKey([% index %], [% caserun.id FILTER none %], document.getElementById('sortkey_[% index %]').value)"></td>
|
||||
<td align="right" valign="top">
|
||||
[% PROCESS select sel = { name => "caserun_build",
|
||||
list => caserun.run.plan.product.builds,
|
||||
|
@ -44,7 +45,7 @@
|
|||
events => "onChange='chBld($index, this.value, \"$caserun.status\", $caserun.id)'"}
|
||||
%]
|
||||
</td>
|
||||
<td align="left" valign="top" width="80px">
|
||||
<td align="left" valign="top">
|
||||
[% caserun.environment.name FILTER html %]
|
||||
<input dojoType="combobox"
|
||||
dataUrl="tr_quicksearch.cgi?action=getenv&search=%{searchString}"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
[%##### BEGIN Hidden Pane #####%]
|
||||
|
||||
<td colspan="11" style="margin:0px;padding:0px; border-bottom: 1px solid #000;">
|
||||
<td colspan="12" style="margin:0px;padding:0px; border-bottom: 1px solid #000;">
|
||||
<div id="ra[% index %]" class="ae_dv">
|
||||
|
||||
[%##### Action, Expected Results #####%]
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
<tr class="bz_row_header">
|
||||
<th width="24" colspan="2">
|
||||
<a href="[% link %]case_id">Case ID</a></th>
|
||||
<th><a href="[% link %]sortkey">Index</a></th>
|
||||
<th><a href="[% link %]build">Build</a></th>
|
||||
<th><a href="[% link %]environment">Environment</a></th>
|
||||
<th><a href="[% link %]assignee">Assigned</a></th>
|
||||
|
@ -57,7 +58,7 @@
|
|||
[% index = loop.count %]
|
||||
<!-- START HEADER FOR [% index %]: CASE [% caserun.case.id %] -->
|
||||
<tr class="[% loop.count % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
|
||||
<td colspan="11"><div style="margin-left:13px;margin-right:29px;"><b><a href="[% link %]summary" style="text-decoration:none;">Summary</a>:</b>
|
||||
<td colspan="12"><div style="margin-left:13px;margin-right:29px;"><b><a href="[% link %]summary" style="text-decoration:none;">Summary</a>:</b>
|
||||
[% caserun.case.summary FILTER html %]</div></td></tr>
|
||||
<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" %]
|
||||
|
|
|
@ -193,6 +193,27 @@ function chOwn(idx, cid, owner){
|
|||
mimetype: "text/plain"
|
||||
});
|
||||
|
||||
}
|
||||
//chSortKey
|
||||
function chSortKey(idx, cid, svalue){
|
||||
displayMsg('pp'+idx, 3, MSG_WAIT.blink());
|
||||
disableAllButtons(true);
|
||||
dojo.io.bind({
|
||||
url: "tr_show_caserun.cgi",
|
||||
content: { caserun_id: cid, index: idx, sortkey: svalue, action: 'update_sortkey'},
|
||||
load: function(type, data, evt){ fillrow(data, idx);
|
||||
if (data.substring(0,5) == 'Error'){
|
||||
displayMsg('pp'+ idx, 2, data);
|
||||
return;
|
||||
}
|
||||
displayMsg('pp'+ idx, 1, MSG_TESTLOG_UPDATED);
|
||||
setTimeout("clearMsg('pp"+ idx +"')",OK_TIMEOUT);
|
||||
disableAllButtons(false);
|
||||
},
|
||||
error: function(type, error){ alert(error.message);},
|
||||
mimetype: "text/plain"
|
||||
});
|
||||
|
||||
}
|
||||
//Attach bugs
|
||||
function attch(idx, cid, bugs){
|
||||
|
|
|
@ -226,6 +226,20 @@ elsif ($action eq 'update_assignee'){
|
|||
}
|
||||
$caserun->set_assignee($assignee_id);
|
||||
}
|
||||
elsif ($action eq 'update_sortkey'){
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
my $caserun = Bugzilla::Testopia::TestCaseRun->new($caserun_id);
|
||||
if (!$caserun->canedit){
|
||||
print "Error - You don't have permission";
|
||||
exit;
|
||||
}
|
||||
my $sortkey = $cgi->param('sortkey');
|
||||
unless (detaint_natural($sortkey)){
|
||||
print "Error - Please enter a number";
|
||||
exit;
|
||||
}
|
||||
$caserun->set_sortkey($sortkey);
|
||||
}
|
||||
elsif ($action eq 'get_notes'){
|
||||
Bugzilla->login(LOGIN_REQUIRED);
|
||||
my $caserun = Bugzilla::Testopia::TestCaseRun->new($caserun_id);
|
||||
|
|
|
@ -416,6 +416,7 @@ sub display {
|
|||
ThrowUserError('testopia-query-too-large', {'limit' => $query_limit}) if $table->view_count > $query_limit;
|
||||
|
||||
my $case = Bugzilla::Testopia::TestCase->new({'case_id' => 0});
|
||||
$vars->{'fullwidth'} = 1;
|
||||
$vars->{'expand_report'} = $cgi->param('expand_report') || 0;
|
||||
$vars->{'expand_filter'} = $cgi->param('expand_filter') || 0;
|
||||
$vars->{'caserun'} = Bugzilla::Testopia::TestCaseRun->new({});
|
||||
|
|
Загрузка…
Ссылка в новой задаче