var subgroup; var filter_req; var showAll = function(err) { // if they cancelled, then just don't change anything: if (err instanceof CancelledError) { return } toggleMessage('none'); var testbox = document.getElementById("subgroup_id"); for (var i=0; i'+ subgroup.testgroups[i].name + ', '; } } if (testgroups_text != '') { testgroups_text = testgroups_text.replace(/, $/g,''); testgroups_link_text = testgroups_link_text.replace(/, $/g,''); document.getElementById('testgroups_display').innerHTML = testgroups_text; document.getElementById('testgroups_link_display').innerHTML = testgroups_link_text; } else { document.getElementById('testgroups_display').innerHTML = 'This subgroup does not belong to any testgroups that are currently enabled.'; document.getElementById('testgroups_link_display').innerHTML = 'This subgroup does not belong to any testgroups that are currently enabled ⇒ Jump to Manage Testgroups.'; } var enabled_em = document.getElementById('enabled') if (subgroup.enabled == 1) { enabled_em.checked = true; } else { enabled_em.checked = false; } populateAllTestcases(); var selectBoxSubgroup = document.getElementById('subgroup_testcases'); selectBoxSubgroup.options.length = 0; for (var i=0; i= 0) { if (branchBox.options[branchBox.selectedIndex].value != '' && testcases[i].branch_id != branchBox.options[branchBox.selectedIndex].value) { continue; } } var optionText = testcases[i].summary + ' (' + testcases[i].testcase_id + ')'; selectBoxAll.options[selectBoxAll.length] = new Option(optionText, testcases[i].testcase_id); } if (selectBoxAll.options.length == 0) { selectBoxAll.options[selectBoxAll.length] = new Option('-No Testcases for this Product/Branch-',''); } } function resetSubgroup() { if (document.getElementById('editform_subgroup_id').value != '') { populateSubgroup(subgroup); switchToEdit(); } else { switchToAdd(); } } function checkFormContents(f) { return ( checkString(f.name, 'Name') && verifySelected(f.product, 'Product') && verifySelected(f.branch, 'Branch') && verifySelected(f.created_by, "Created By") ); } function previewTestcase(selectID) { var selectBox = document.getElementById(selectID); if (selectBox) { if (selectBox.selectedIndex >= 0) { if (selectBox.options[selectBox.selectedIndex].value != '') { window.open('show_test.cgi?id=' + selectBox.options[selectBox.selectedIndex].value, 'testcase_preview'); } } else { toggleMessage('failure','No testcase selected!'); } } } function updatePersistVars() { var productBox = document.getElementById('product_filter'); var branchBox = document.getElementById('branch_filter'); var testgroupBox = document.getElementById('testgroup_filter'); if (productBox.selectedIndex) { var productPersist = document.getElementById('product_persist'); productPersist.value = productBox.options[productBox.selectedIndex].value; } if (branchBox.selectedIndex) { var branchPersist = document.getElementById('branch_persist'); branchPersist.value = branchBox.options[branchBox.selectedIndex].value; } if (testgroupBox.selectedIndex) { var testgroupPersist = document.getElementById('testgroup_persist'); testgroupPersist.value = testgroupBox.options[testgroupBox.selectedIndex].value; } } function disableCloneUpdateFields() { document.getElementById('old_name_regexp').disabled=true; document.getElementById('new_name_regexp').disabled=true; document.getElementById('update_names').setAttribute('class','disabled'); } function enableCloneUpdateFields() { document.getElementById('old_name_regexp').disabled=false; document.getElementById('new_name_regexp').disabled=false; document.getElementById('update_names').setAttribute('class',''); } var manageTestcasesHelpTitle="Help with Managing Testcases"; var manageTestcasesHelpText="

The select box on the left contains all the testcases for the chosen product, INCLUDING any testcases already contained in the subgroup. You can use the button to add testcases to the subgroup, and the button to remove testcases from the subgroup. NOTE: neither of the actions will alter the list of testcases on the left.

You can preview any testcase from the left-hand select box by selecting the testcase, and then clicking on the 'Preview Testcase' link below the select box. If more than one testcase is selected, only the first testcase will be previewed.

You can change the display order of testcases within the subgroup using the and buttons to the right of the right-hand select box. Testcases can be re-ordered singly or in groups by selecting multiple testcases in the right-hand select box.

";