Clean up issues with runs
git-svn-id: svn://10.0.0.236/trunk@246540 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -853,13 +853,20 @@ Ext.extend(RunFilterGrid, Ext.grid.GridPanel, {
|
||||
if(!this.menu){ // create context menu on first right click
|
||||
this.menu = new Ext.menu.Menu({
|
||||
id:'run_filter_ctx',
|
||||
items: [
|
||||
{
|
||||
text: 'Open search in new tab',
|
||||
handler: function(){}
|
||||
},{
|
||||
text: 'Delete Saved Search',
|
||||
handler: function(){}
|
||||
items: [{
|
||||
text: 'Delete Saved Filter',
|
||||
handler: function(){
|
||||
var form = new Ext.form.BasicForm('testopia_helper_frm', {});
|
||||
form.submit({
|
||||
url: 'tr_process_run.cgi',
|
||||
params: {action: 'delete_filter', query_name: grid.store.getAt(index).get('name'), run_id: grid.store.baseParams.run_id},
|
||||
success: function(){
|
||||
TestopiaUtil.notify.msg('Filter removed', 'filter removed successfully');
|
||||
grid.store.reload();
|
||||
},
|
||||
failure: testopiaError
|
||||
});
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -33,6 +33,9 @@ if ($cgi->param('object') eq 'plan'){
|
||||
elsif ($cgi->param('object') eq 'case'){
|
||||
$obj = Bugzilla::Testopia::TestCase->new($cgi->param('object_id'));
|
||||
}
|
||||
elsif ($cgi->param('object') eq 'run'){
|
||||
$obj = Bugzilla::Testopia::TestRun->new($cgi->param('object_id'));
|
||||
}
|
||||
else{
|
||||
ThrowUserError("testopia-unknown-type", {'object' => $obj});
|
||||
}
|
||||
|
||||
@@ -186,8 +186,9 @@ elsif ($action eq 'delete_filter'){
|
||||
my $dbh = Bugzilla->dbh;
|
||||
ThrowUserError('query_name_missing') unless $cgi->param('query_name');
|
||||
ThrowUserError("testopia-read-only", {'object' => $run}) unless $run->canedit;
|
||||
|
||||
my $qname = '__run_id_' . $run->id . '_' . $cgi->param('query_name');
|
||||
my $qname = $cgi->param('query_name');
|
||||
trick_taint($qname);
|
||||
$qname = '__run_id_' . $run->id . '_' . $qname;
|
||||
|
||||
$dbh->do(
|
||||
"DELETE FROM test_named_queries
|
||||
|
||||
Reference in New Issue
Block a user