/** * */ private function init_filter_execution_type() { if (!$this->tc_mgr) { $this->tc_mgr = new testcase($this->db); } $key = 'filter_execution_type'; $selection = $this->args->{$key}; // handle filter reset if (!$selection || $this->args->reset_filters) { $selection = null; } else { $this->do_filtering = true; } $this->filters[$key] = array('items' => array(), 'selected' => $selection); // load available execution types // add "any" string to these types at index 0 as default selection $this->filters[$key]['items'] = $this->tc_mgr->get_execution_types(); $this->filters[$key]['items'] = array(0 => $this->option_strings['any']) + $this->filters[$key]['items']; $this->active_filters[$key] = $selection; }
function initializeGui(&$dbHandler, &$argsObj, $cfgObj, &$mgrPool) { $buildMgr = new build_mgr($dbHandler); $platformMgr = new tlPlatform($dbHandler, $argsObj->tproject_id); $gui = new stdClass(); $gui->cfg = $cfgObj; $gui->issueTrackerIntegrationOn = false; $gui->tplan_id = $argsObj->tplan_id; $gui->tproject_id = $argsObj->tproject_id; $gui->build_id = $argsObj->build_id; $gui->platform_id = $argsObj->platform_id; $gui->execStatusValues = null; $gui->can_use_bulk_op = 0; $gui->exec_notes_editors = null; $gui->bulk_exec_notes_editor = null; $gui->req_details = null; $gui->attachmentInfos = null; $gui->bugs = null; $gui->other_exec_cfields = null; $gui->ownerDisplayName = null; $gui->editorType = $gui->cfg->editorCfg['type']; $gui->filter_assigned_to = $argsObj->filter_assigned_to; $gui->tester_id = $argsObj->user_id; $gui->include_unassigned = $argsObj->include_unassigned; $gui->tpn_view_status = $argsObj->tpn_view_status; $gui->bn_view_status = $argsObj->bn_view_status; $gui->bc_view_status = $argsObj->bc_view_status; $gui->platform_notes_view_status = $argsObj->platform_notes_view_status; $gui->refreshTree = $argsObj->refreshTree; if (!$argsObj->status || $argsObj->status == $gui->cfg->tc_status['not_run']) { $gui->refreshTree = 0; } $gui->map_last_exec_any_build = null; $gui->map_last_exec = null; // Just for the record: // doing this here, we avoid to do on processTestSuite() and processTestCase(), // but absolutely this will not improve in ANY WAY perfomance, because we do not loop // over these two functions. $gui->tcasePrefix = $mgrPool->tproject->getTestCasePrefix($argsObj->tproject_id); $build_info = $buildMgr->get_by_id($argsObj->build_id); $gui->build_notes = $build_info['notes']; $gui->build_is_open = $build_info['is_open'] == 1 ? 1 : 0; $gui->execution_types = testcase::get_execution_types(); if ($argsObj->filter_assigned_to) { $userSet = tlUser::getByIds($dbHandler, array_values($argsObj->filter_assigned_to)); if ($userSet) { foreach ($userSet as $key => $userObj) { $gui->ownerDisplayName[$key] = $userObj->getDisplayName(); } } } // ------------------------------------------------------------------ $the_builds = $mgrPool->tplan->get_builds_for_html_options($argsObj->tplan_id); $gui->build_name = isset($the_builds[$argsObj->build_id]) ? $the_builds[$argsObj->build_id] : ''; $gui->grants = initializeRights($dbHandler, $argsObj->user, $argsObj->tproject_id, $argsObj->tplan_id); $gui->exec_mode = initializeExecMode($dbHandler, $gui->cfg->exec_cfg, $argsObj->user, $argsObj->tproject_id, $argsObj->tplan_id); $rs = $mgrPool->tplan->get_by_id($argsObj->tplan_id); $gui->testplan_notes = $rs['notes']; // Important note: // custom fields for test plan can be edited ONLY on design, that's reason why we are using // scope = 'design' instead of 'execution' $gui->testplan_cfields = $mgrPool->tplan->html_table_of_custom_field_values($argsObj->tplan_id, 'design', array('show_on_execution' => 1)); $gui->history_on = manage_history_on($_REQUEST, $_SESSION, $gui->cfg->exec_cfg, 'btn_history_on', 'btn_history_off', 'history_on'); $gui->history_status_btn_name = $gui->history_on ? 'btn_history_off' : 'btn_history_on'; $dummy = $platformMgr->getLinkedToTestplan($argsObj->tplan_id); $gui->has_platforms = !is_null($dummy) ? 1 : 0; $gui->platform_info['id'] = 0; $gui->platform_info['name'] = ''; if (!is_null($argsObj->platform_id) && $argsObj->platform_id > 0) { $gui->platform_info = $platformMgr->getByID($argsObj->platform_id); } $gui->node_id = $argsObj->id; $gui->showBuildColumn = $gui->history_on == 0 || $gui->cfg->exec_cfg->show_history_all_builds; $gui->showPlatformColumn = $gui->has_platforms && ($gui->history_on == 0 || $gui->cfg->exec_cfg->show_history_all_platforms); return $gui; }
* @author Francisco Mancardi * * With this page you can launch a set of available methods, to understand * and have inside view about return type . * * rev : * */ require_once '../../../config.inc.php'; require_once 'common.php'; require_once 'tree.class.php'; // require_once('dBug.php'); testlinkInitPage($db); echo "<pre> testcase - static methods - get_execution_types()"; echo "</pre>"; new dBug(testcase::get_execution_types()); echo "<pre> testcase - static methods - buildCFLocationMap()"; echo "</pre>"; new dBug(testcase::buildCFLocationMap()); echo "<pre> testcase - access to class const - testcase::EXECUTION_TYPE_MANUAL"; echo "</pre>"; echo testcase::EXECUTION_TYPE_MANUAL . '<br>'; echo "<pre> testcase - constructor - testcase(&\$db)"; echo "</pre>"; $tcase_mgr = new testcase($db); // new dBug($tcase_mgr); $items = array(1628, 1626, 1616, 392, 531); $va = $tcase_mgr->get_last_active_version($items); new dBug($va); $va = $tcase_mgr->get_last_active_version($items[0]); new dBug($va);