From beaede67c055d143fc4a2de019ebdec042f9f8f3 Mon Sep 17 00:00:00 2001 From: "ghendricks%novell.com" Date: Fri, 28 Mar 2008 19:15:35 +0000 Subject: [PATCH] Environment combo only showing first 25 git-svn-id: svn://10.0.0.236/trunk@248789 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/testopia/testopia/js/plan.js | 25 ++++++++++++++++++- mozilla/webtools/testopia/testopia/js/run.js | 13 +++++++--- mozilla/webtools/testopia/testopia/js/util.js | 1 + mozilla/webtools/testopia/tr_run_reports.cgi | 2 +- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/mozilla/webtools/testopia/testopia/js/plan.js b/mozilla/webtools/testopia/testopia/js/plan.js index b9ba3ead5ca..84b23a52c51 100644 --- a/mozilla/webtools/testopia/testopia/js/plan.js +++ b/mozilla/webtools/testopia/testopia/js/plan.js @@ -272,7 +272,30 @@ Ext.extend(PlanGrid, Ext.grid.EditorGridPanel, { url: newPortlet.url }); } - }] + },{ + text: 'New Bug Report', + handler: function(){ + Ext.getCmp('object_panel').setActiveTab('dashboardpanel'); + var bug_list = new Testopia.BugReport({ + plan_ids: getSelectedObjects(grid, 'plan_id') + }); + var newPortlet = new Ext.ux.Portlet({ + title: 'Bug Report', + closable: true, + autoScroll: true, + tools: [{ + id:'close', + handler: function(e, target, panel){ + panel.ownerCt.remove(panel, true); + } + }], + items: bug_list + }); + Ext.getCmp('dashboard_leftcol').add(newPortlet); + Ext.getCmp('dashboard_leftcol').doLayout(); + bug_list.store.load(); + } + }] } },{ text: 'Refresh List', diff --git a/mozilla/webtools/testopia/testopia/js/run.js b/mozilla/webtools/testopia/testopia/js/run.js index cb5c890dc5d..d0a3c5e23a8 100644 --- a/mozilla/webtools/testopia/testopia/js/run.js +++ b/mozilla/webtools/testopia/testopia/js/run.js @@ -295,7 +295,12 @@ Ext.extend(RunGrid, Ext.grid.EditorGridPanel, { title: 'Bug Report', closable: true, autoScroll: true, - tools: PortalTools, + tools: [{ + id:'close', + handler: function(e, target, panel){ + panel.ownerCt.remove(panel, true); + } + }], items: bug_list }); Ext.getCmp('dashboard_leftcol').add(newPortlet); @@ -638,7 +643,7 @@ var NewRunForm = function(plan){ Ext.getCmp('plan_run_grid').store.reload(); } try { - Ext.getCmp('newrun-win').close(); + Ext.getCmp('newRun-win').close(); } catch (err){} }, @@ -651,7 +656,7 @@ var NewRunForm = function(plan){ handler: function(){ Ext.getCmp('newrunsouth').getForm().reset(); try { - Ext.getCmp('newrun-win').close(); + Ext.getCmp('newRun-win').close(); } catch (err){} } @@ -949,7 +954,7 @@ Testopia.BugReport = function(params){ ]}), remoteSort: true, sortInfo: {field: 'run_id', direction: "ASC"}, - groupField: 'run_id' + groupField: 'bug_id' }); this.view = new Ext.grid.GroupingView({ forceFit:true, diff --git a/mozilla/webtools/testopia/testopia/js/util.js b/mozilla/webtools/testopia/testopia/js/util.js index e5d0d541541..f9ea6e2ae6e 100755 --- a/mozilla/webtools/testopia/testopia/js/util.js +++ b/mozilla/webtools/testopia/testopia/js/util.js @@ -554,6 +554,7 @@ Ext.extend(CaseCategoryCombo, Ext.form.ComboBox); * EnvironmentCombo */ EnvironmentCombo = function(cfg){ + cfg.params.viewall = 1; EnvironmentCombo.superclass.constructor.call(this,{ id: cfg.id || 'environment_combo', store: cfg.transform ? false : new EnvironmentStore(cfg.params, cfg.mode == 'local'? true : false), diff --git a/mozilla/webtools/testopia/tr_run_reports.cgi b/mozilla/webtools/testopia/tr_run_reports.cgi index 71bbfe678db..dcac3460c8d 100644 --- a/mozilla/webtools/testopia/tr_run_reports.cgi +++ b/mozilla/webtools/testopia/tr_run_reports.cgi @@ -143,7 +143,7 @@ elsif ($type eq 'bug'){ push @ids, $r->id; } my $ref = $dbh->selectall_arrayref(" - SELECT tcb.bug_id, tcr.run_id, tcr.case_id + SELECT DISTINCT tcb.bug_id, tcr.run_id, tcr.case_id FROM test_case_bugs AS tcb INNER JOIN test_case_runs AS tcr ON tcr.case_id = tcb.case_id WHERE tcr.run_id in (" . join (',',@ids) . ")",