Multiple bug fixes

git-svn-id: svn://10.0.0.236/trunk@252417 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ghendricks%novell.com
2008-06-17 23:29:18 +00:00
parent e0df0b36c2
commit ea094fc380
31 changed files with 61 additions and 40 deletions

View File

@@ -389,6 +389,10 @@ sub init {
push @supptables, "INNER JOIN test_case_plans AS case_plans ON test_cases.case_id = case_plans.case_id";
push @orderby, 'case_plans.plan_id';
}
elsif($order eq 'requirement' && $obj eq 'case_run'){
push @supptables, "INNER JOIN test_cases ON test_cases.case_id = test_case_runs.case_id";
push @orderby, 'test_cases.requirement';
}
elsif ($order eq 'priority') {
if ($obj eq 'case_run'){
push @supptables, "INNER JOIN test_cases ON test_cases.case_id = test_case_runs.case_id";

View File

@@ -6,16 +6,20 @@ use Bugzilla::Testopia::TestCase;
my $vars = Bugzilla->hook_args->{vars};
my $cgi = Bugzilla->cgi;
if ($cgi->param('case_id')) {
my $caserun_id = $cgi->param('caserun_id');
my $case_id = $cgi->param('case_id');
if (detaint_natural($case_id)) {
my $case = Bugzilla::Testopia::TestCase->new($cgi->param('case_id'));
ThrowUserError("invalid-test-id-non-existent", {'id' => $case_id, 'type' => 'Case'}) unless $case;
ThrowUserError("testopia-read-only", {'object' => $case}) unless $case->canedit;
$case->attach_bug($vars->{'id'});
$vars->{'case'} = $case;
}
if ($cgi->param('caserun_id')) {
if (detaint_natural($caserun_id)) {
my $caserun = Bugzilla::Testopia::TestCaseRun->new($cgi->param('caserun_id'));
ThrowUserError("invalid-test-id-non-existent", {'id' => $caserun_id, 'type' => 'Case-Run'}) unless $caserun;
ThrowUserError("testopia-read-only", {'object' => $caserun}) unless $caserun->canedit;
$caserun->attach_bug($vars->{'id'});

View File

@@ -41,10 +41,10 @@
<li class="tr_saved_search">
<select class="dropdown" onchange="if (this.selectedIndex != 0) {document.location=this.value}">
<option>--Testopia--</option>
<option value="tr_list_runs.cgi?current_tab=run&run_status=0">Current Runs</a></option>
<option value="tr_list_plans.cgi?current_tab=plan&name_type=allwordssubstr&name=&plan_text_type=allwordssubstr&plan_text=&tag_type=allwords&tags=&author_type=exact&author=[% user.login FILTER url_quote %]&plan_id=">My Plans</a></option>
<option value="tr_list_cases.cgi?current_tab=case&summary_type=allwordssubstr&summary=&tcaction_type=allwordssubstr&tcaction=&tceffect_type=allwordssubstr&tceffect=&script_type=allwordssubstr&script=&requirement_type=allwordssubstr&requirement=&tag_type=allwords&tags=&author_type=exact&author=&default_tester_type=substring&default_tester=[% user.login FILTER url_quote %]&case_id=&plan_id=">My Cases</a></option>
<option value="tr_list_runs.cgi?current_tab=run&summary_type=allwordssubstr&summary=&notes_type=allwordssubstr&notes=&environment_type=allwordssubstr&environment=&tag_type=allwords&tag=&manager_type=substring&manager=[% user.login FILTER url_quote %]&run_id=&plan_id=&assignee_type=substr&assignee=[% user.login FILTER url_quote %]">My Runs</a></option>
<option value="tr_list_runs.cgi?current_tab=run&run_status=0&distinct=1">Current Runs</a></option>
<option value="tr_list_plans.cgi?current_tab=plan&name_type=allwordssubstr&name=&plan_text_type=allwordssubstr&plan_text=&tag_type=allwords&tags=&author_type=exact&author=[% user.login FILTER url_quote %]&plan_id=&distinct=1">My Plans</a></option>
<option value="tr_list_cases.cgi?current_tab=case&summary_type=allwordssubstr&summary=&tcaction_type=allwordssubstr&tcaction=&tceffect_type=allwordssubstr&tceffect=&script_type=allwordssubstr&script=&requirement_type=allwordssubstr&requirement=&tag_type=allwords&tags=&author_type=exact&author=&default_tester_type=substring&default_tester=[% user.login FILTER url_quote %]&case_id=&plan_id=&distinct=1">My Cases</a></option>
<option value="tr_list_runs.cgi?current_tab=run&summary_type=allwordssubstr&summary=&notes_type=allwordssubstr&notes=&environment_type=allwordssubstr&environment=&tag_type=allwords&tag=&manager_type=substring&manager=[% user.login FILTER url_quote %]&run_id=&plan_id=&assignee_type=substr&assignee=[% user.login FILTER url_quote %]&distinct=1">My Runs</a></option>
[% FOREACH q = user.testopia_queries %]
<option value="[% q.query %]">[% q.name FILTER html %]</option>
[% END %]

View File

@@ -24,10 +24,10 @@
Testopia Saved Searches:
</div>
<ul class="links">
<li><a href="tr_list_runs.cgi?current_tab=run&run_status=0">Current Runs</a></li>
<li><span class="separator">| </span><a href="tr_list_plans.cgi?current_tab=plan&name_type=allwordssubstr&name=&plan_text_type=allwordssubstr&plan_text=&tag_type=allwords&tags=&author_type=exact&author=[% user.login FILTER url_quote %]&plan_id=">My Plans</a></li>
<li><span class="separator">| </span><a href="tr_list_cases.cgi?current_tab=case&summary_type=allwordssubstr&summary=&tcaction_type=allwordssubstr&tcaction=&tceffect_type=allwordssubstr&tceffect=&script_type=allwordssubstr&script=&requirement_type=allwordssubstr&requirement=&tag_type=allwords&tags=&author_type=exact&author=&default_tester_type=substring&default_tester=[% user.login FILTER url_quote %]&case_id=&plan_id=">My Cases</a></li>
<li><span class="separator">| </span><a href="tr_list_runs.cgi?current_tab=run&summary_type=allwordssubstr&summary=&notes_type=allwordssubstr&notes=&environment_type=allwordssubstr&environment=&tag_type=allwords&tag=&manager_type=substring&manager=[% user.login FILTER url_quote %]&run_id=&plan_id=&assignee_type=substr&assignee=[% user.login FILTER url_quote %]">My Runs</a></li>
<li><a href="tr_list_runs.cgi?current_tab=run&run_status=0&distinct=1">Current Runs</a></li>
<li><span class="separator">| </span><a href="tr_list_plans.cgi?current_tab=plan&name_type=allwordssubstr&name=&plan_text_type=allwordssubstr&plan_text=&tag_type=allwords&tags=&author_type=exact&author=[% user.login FILTER url_quote %]&plan_id=&distinct=1">My Plans</a></li>
<li><span class="separator">| </span><a href="tr_list_cases.cgi?current_tab=case&summary_type=allwordssubstr&summary=&tcaction_type=allwordssubstr&tcaction=&tceffect_type=allwordssubstr&tceffect=&script_type=allwordssubstr&script=&requirement_type=allwordssubstr&requirement=&tag_type=allwords&tags=&author_type=exact&author=&default_tester_type=substring&default_tester=[% user.login FILTER url_quote %]&case_id=&plan_id=&distinct=1">My Cases</a></li>
<li><span class="separator">| </span><a href="tr_list_runs.cgi?current_tab=run&summary_type=allwordssubstr&summary=&notes_type=allwordssubstr&notes=&environment_type=allwordssubstr&environment=&tag_type=allwords&tag=&manager_type=substring&manager=[% user.login FILTER url_quote %]&run_id=&plan_id=&assignee_type=substr&assignee=[% user.login FILTER url_quote %]&distinct=1">My Runs</a></li>
[% FOREACH query = user.testopia_queries %]
<li><span class="separator">| </span><a href="[% query.query %]">[% query.name FILTER html %]</a></li>
[% END %]

View File

@@ -19,7 +19,7 @@
#%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = "Add a New Test Plan Type"
%]

View File

@@ -19,6 +19,6 @@
#%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = "Test Plan Types"
%]

View File

@@ -19,7 +19,7 @@
#%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = "Edit Test Plan Types"
%]

View File

@@ -19,7 +19,7 @@
#%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = "Test Plan Types"
%]

View File

@@ -36,7 +36,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
[% PROCESS testopia/style.none.tmpl %]

View File

@@ -23,7 +23,7 @@
[% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = "Search by Attachment Number"
%]

View File

@@ -23,7 +23,7 @@
[% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = "Search by Test Case Number"
%]

View File

@@ -28,6 +28,7 @@
[% PROCESS testopia/style.none.tmpl %]
[% javascript_urls.push("testopia/js/case.js") %]
[% javascript_urls.push("testopia/js/plan.js") %]
[% javascript_urls.push("testopia/js/tags.js") %]
[% javascript_urls.push("testopia/js/caserun.js") %]

View File

@@ -34,7 +34,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
[% PROCESS testopia/style.none.tmpl %]
[% PROCESS testopia/blocks.html.tmpl %]

View File

@@ -35,7 +35,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
[% PROCESS testopia/style.none.tmpl %]
[% PROCESS testopia/blocks.html.tmpl %]

View File

@@ -23,7 +23,7 @@
[% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = "Search by Test Run Environment Number"
%]

View File

@@ -34,7 +34,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
[% IF deleted %]
Environment Deleted

View File

@@ -34,7 +34,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
[% PROCESS testopia/style.none.tmpl %]
[% PROCESS testopia/blocks.html.tmpl %]

View File

@@ -34,7 +34,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
[% PROCESS testopia/style.none.tmpl %]
[% PROCESS testopia/blocks.html.tmpl %]

View File

@@ -35,7 +35,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
[% PROCESS testopia/style.none.tmpl %]
[% PROCESS testopia/blocks.html.tmpl %]

View File

@@ -19,7 +19,7 @@
#%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
<form action="tr_quicksearch.cgi"><b>Testopia Quick Search:</b> <input
name="query"> <input type="submit"></form>

View File

@@ -24,7 +24,7 @@
[% title = "Bug Impact Report for Plan $plan.id - $plan.name" %]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
<p>This report details the bugs detected in this test plan and the number of test cases that each bug is attached to.
Those bugs impacting the most test cases appear at the top.

View File

@@ -35,7 +35,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = title
style = style
%]

View File

@@ -35,7 +35,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = title
style = style
%]

View File

@@ -35,7 +35,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css'] %]
%]
[% PROCESS testopia/style.none.tmpl %]
<h3>Summary of all runs</h3>

View File

@@ -35,7 +35,7 @@
[%############################################################################%]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = title
style = style
%]

View File

@@ -23,7 +23,7 @@
[% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = "Search by Test Run Number"
%]

View File

@@ -20,7 +20,7 @@
[% PROCESS global/header.html.tmpl
style_urls = ['testopia.css']
title = "Tags" %]
[% PROCESS testopia/messages.html.tmpl %]
[% PROCESS testopia/blocks.html.tmpl %]

View File

@@ -902,10 +902,16 @@ NewCaseForm = function(plan_ids, product_id, run_id){
}
},{
text: 'Cancel',
id: 'ncf_cancel_btn',
handler: function(){
Ext.getCmp('newcaseform').getForm().reset();
try {
Ext.getCmp('newcase-win').close();
if (Ext.getCmp('newcase-win')) {
Ext.getCmp('newcase-win').close();
}
else{
window.location = 'tr_show_product.cgi';
}
}
catch (err){}
}
@@ -1205,7 +1211,12 @@ CaseClonePanel = function(product_id, cases){
},{
text: 'Cancel',
handler: function(){
Ext.getCmp('case-clone-win').close();
try {
Ext.getCmp('case-clone-win').close();
}
catch (err){
window.location = 'tr_show_product.cgi';
}
}
}]
});

View File

@@ -125,6 +125,7 @@ CaseRunFilter = function (){
var ds = Ext.getCmp('caserun_grid').store;
ds.baseParams = searchform.getValues();
ds.baseParams.limit = Ext.getCmp('testopia_pager').pageSize;
ds.baseParams.distinct = 1;
ds.load({
callback: function(){
Ext.getCmp('filtered_txt').show();

View File

@@ -655,10 +655,6 @@ var NewRunForm = function(plan){
if (Ext.getCmp('plan_run_grid')){
Ext.getCmp('plan_run_grid').store.reload();
}
try {
Ext.getCmp('newRun-win').close();
}
catch (err){}
},
failure: testopiaError
});
@@ -666,12 +662,15 @@ var NewRunForm = function(plan){
},{
text: 'Cancel',
type: 'reset',
id: 'nrf_cancel_btn',
handler: function(){
Ext.getCmp('newrunsouth').getForm().reset();
try {
Ext.getCmp('newRun-win').close();
}
catch (err){}
catch (err){
window.location = 'tr_show_product.cgi';
}
}
}]
});

View File

@@ -956,7 +956,8 @@ DocCompareToolbar = function(object, id){
var foo = Ext.getCmp('doc_view').getValue();
var tab = Ext.getCmp('object_panel').add({
title: 'Version ' + Ext.getCmp('doc_view').getValue(),
closable: true
closable: true,
autoScroll: true
});
tab.show();
tab.load({