- display only one copy of each subgroup, since subgroups can belong to more than one testgroup

This commit is contained in:
ccooper%deadsquid.com 2006-08-09 20:06:36 +00:00
Родитель 1c8b4145cc
Коммит 946b0578cf
2 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -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 + '<a target="manage_testgroups" href="manage_testgroups.cgi?testgroup_id=' + subgroup.testgroups[i].testgroup_id + '">'+ subgroup.testgroups[i].name + '</a>, ';
}
}
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();