$gui->resultSet = null; $gui->tproject_id = $args->tproject_id; $gui->tproject_name = $args->tproject_name; $gui->tplan_name = $args->tplan_name; $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($args->tproject_id); $labels = init_labels(array('design' => null)); $edit_icon = TL_THEME_IMG_DIR . "edit_icon.png"; $testCaseSet = array(); if ($tplan_mgr->count_testcases($args->tplan_id) > 0) { $resultsCfg = config_get('results'); $tcase_cfg = config_get('testcase_cfg'); // ----------------------------------------------------------------------------------- $gui->code_status = $resultsCfg['code_status']; // Get the custom fields linked/enabled on execution to a test project // This will be used on report to give name to header of columns that hold custom field value $gui->cfields = $cfield_mgr->get_linked_cfields_at_testplan_design($args->tproject_id, 1, 'testcase', null, null, null, 'name'); if (!is_null($gui->cfields)) { foreach ($gui->cfields as $key => $values) { $cf_place_holder['cfields'][$key] = ''; } } // Now get TPlan -> Test Cases with custom field values $cf_map = $cfield_mgr->get_linked_cfields_at_testplan_design($args->tproject_id, 1, 'testcase', null, null, $args->tplan_id); // need to transform in structure that allow easy display // Every row is an execution with exec data plus a column that contains following map: // 'cfields' => CFNAME1 => value // CFNAME2 => value $result = array(); if (!is_null($cf_map)) { foreach ($cf_map as $exec_id => $exec_info) { // Get common exec info and remove useless keys