From 946b0578cfde575dbfee0afa9c094c1651df8a88 Mon Sep 17 00:00:00 2001 From: "ccooper%deadsquid.com" Date: Wed, 9 Aug 2006 20:06:36 +0000 Subject: [PATCH] - display only one copy of each subgroup, since subgroups can belong to more than one testgroup --- webtools/litmus/Litmus/FormWidget.pm | 2 +- .../litmus/templates/en/default/admin/manage_subgroups.tmpl | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/webtools/litmus/Litmus/FormWidget.pm b/webtools/litmus/Litmus/FormWidget.pm index e85dcc53a801..f92d4406aeaa 100755 --- a/webtools/litmus/Litmus/FormWidget.pm +++ b/webtools/litmus/Litmus/FormWidget.pm @@ -200,7 +200,7 @@ sub getTestcases() ######################################################################### sub getSubgroups() { - my $sql = "SELECT s.subgroup_id, s.name, s.product_id, tgb.branch_id FROM subgroups s, subgroup_testgroups sgtg, testgroup_branches tgb WHERE s.enabled=1 AND s.subgroup_id=sgtg.subgroup_id AND sgtg.testgroup_id=tgb.testgroup_id ORDER BY s.name ASC, s.subgroup_id DESC"; + my $sql = "SELECT DISTINCT(s.subgroup_id), s.name, s.product_id, tgb.branch_id FROM subgroups s, subgroup_testgroups sgtg, testgroup_branches tgb WHERE s.enabled=1 AND s.subgroup_id=sgtg.subgroup_id AND sgtg.testgroup_id=tgb.testgroup_id ORDER BY s.name ASC, s.subgroup_id DESC"; return _getValues($sql); } diff --git a/webtools/litmus/templates/en/default/admin/manage_subgroups.tmpl b/webtools/litmus/templates/en/default/admin/manage_subgroups.tmpl index 2b8f9b5734a3..af1b0e773bd6 100644 --- a/webtools/litmus/templates/en/default/admin/manage_subgroups.tmpl +++ b/webtools/litmus/templates/en/default/admin/manage_subgroups.tmpl @@ -157,7 +157,6 @@ function populateSubgroup(data) { if (subgroup.testgroups[i].name != '') { testgroups_text = testgroups_text + subgroup.testgroups[i].name + ', '; testgroups_link_text = testgroups_link_text + ''+ subgroup.testgroups[i].name + ', '; - } } if (testgroups_text != '') { @@ -175,7 +174,7 @@ function populateSubgroup(data) { enabled_em.checked = true; } else { enabled_em.checked = false; - } + } document.getElementById('editform_testrunner_group_id').innerHTML = subgroup.testrunner_group_id; populateAllTestcases();