예제 #1
0
/**
 * init_args
 *
 */
function init_args(&$dbHandler)
{
    $args = new stdClass();
    $args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
    $args->tplans = null;
    if ($args->tproject_id > 0) {
        $tprojectMgr = new testproject($dbHandler);
        $dummy = $tprojectMgr->tree_manager->get_node_hierarchy_info($args->tproject_id);
        $args->tproject_name = $dummy['name'];
        $args->tplans = $tprojectMgr->get_all_testplans($args->tproject_id);
    }
    $args->grants = new stdClass();
    $args->grants->testplan_create = $_SESSION['currentUser']->hasRight($dbHandler, "mgt_testplan_create", $args->tproject_id);
    return $args;
}
예제 #2
0
function doCopyToTestPlans(&$argsObj, &$buildMgr, &$tplanMgr)
{
    $tprojectMgr = new testproject($tplanMgr->db);
    // exclude this testplan
    $filters = array('tplan2exclude' => $argsObj->tplan_id);
    $tplanset = $tprojectMgr->get_all_testplans($argsObj->tproject_id, $filters);
    if (!is_null($tplanset)) {
        foreach ($tplanset as $id => $info) {
            if (!$tplanMgr->check_build_name_existence($id, $argsObj->build_name)) {
                $buildMgr->create($id, $argsObj->build_name, $argsObj->notes, $argsObj->is_active, $argsObj->is_open);
            }
        }
    }
}
예제 #3
0
    foreach ($tcase_all_info as $tcversion_info) {
        if ($tcversion_info['id'] == $args->tcversion_id) {
            $version = $tcversion_info['version'];
            $gui->pageTitle = lang_get('test_case') . ':' . $tcversion_info['name'];
            $gui->tcaseIdentity = $tproject_mgr->getTestCasePrefix($args->tproject_id);
            $gui->tcaseIdentity .= $glue . $tcversion_info['tc_external_id'] . ':' . $tcversion_info['name'];
            break;
        }
    }
}
// 20100514 - franciscom
// Why I'm filter on NOT_EXECUTED ??? -> this causes BUGID 3189
// $link_info = $tcase_mgr->get_linked_versions($args->tcase_id,'NOT_EXECUTED');
$link_info = $tcase_mgr->get_linked_versions($args->tcase_id);
// 20100124 - work only on ACTIVE TEST PLANS => array('plan_status' => 1)
if (!is_null($tplanSet = $tproject_mgr->get_all_testplans($args->tproject_id, array('plan_status' => 1)))) {
    $has_links = array_fill_keys(array_keys($tplanSet), false);
    $linked_tplans = null;
    if (!is_null($link_info)) {
        foreach ($link_info as $tcversion_id => $info) {
            foreach ($info as $tplan_id => $platform_info) {
                $has_links[$tplan_id] = true;
                foreach ($platform_info as $platform_id => $value) {
                    // $gui->tplans[$tplan_id][$platform_id]['tcversion_id']=$value['id'];
                    $linked_tplans[$tplan_id][$platform_id]['tcversion_id'] = $value['tcversion_id'];
                    $linked_tplans[$tplan_id][$platform_id]['version'] = $value['version'];
                    $linked_tplans[$tplan_id][$platform_id]['draw_checkbox'] = false;
                }
            }
        }
    }
예제 #4
0
*/
require_once '../../config.inc.php';
require_once "common.php";
testlinkInitPage($db, false, false, "checkRights");
$templateCfg = templateConfiguration();
$args = init_args();
$gui = new stdClass();
$gui->tproject_id = $args->tproject_id;
$gui->tplans = null;
$gui->user_feedback = '';
$gui->grants = new stdClass();
$gui->grants->testplan_create = has_rights($db, "mgt_testplan_create");
$gui->main_descr = lang_get('testplan_title_tp_management') . " - " . lang_get('testproject') . ' ' . $args->tproject_name;
if ($args->tproject_id) {
    $tproject_mgr = new testproject($db);
    $gui->tplans = $tproject_mgr->get_all_testplans($args->tproject_id);
}
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
/**
 * init_args
 *
 */
function init_args()
{
    $args = new stdClass();
    $args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
    $args->tproject_name = isset($_SESSION['testprojectName']) ? trim($_SESSION['testprojectName']) : '';
    return $args;
}
예제 #5
0
$gui->grants = getGrants($db, $user, $userIsBlindFolded);
$gui->hasTestCases = false;
if ($gui->grants['view_tc']) {
    $gui->hasTestCases = $tproject_mgr->count_testcases($testprojectID) > 0 ? 1 : 0;
}
$gui->hasKeywords = false;
if ($gui->hasTestCases) {
    $gui->hasKeywords = $tproject_mgr->hasKeywords($testprojectID);
}
// ----- Test Plan Section --------------------------------------------------------------
/** 
 * @TODO - franciscom - we must understand if these two calls are really needed,
 * or is enough just call to getAccessibleTestPlans()
 */
$filters = array('plan_status' => ACTIVE);
$gui->num_active_tplans = sizeof($tproject_mgr->get_all_testplans($testprojectID, $filters));
// get Test Plans available for the user
$arrPlans = $currentUser->getAccessibleTestPlans($db, $testprojectID);
if ($testplanID > 0) {
    // if this test plan is present on $arrPlans
    //	  OK we will set it on $arrPlans as selected one.
    // else
    //    need to set test plan on session
    //
    $index = 0;
    $found = 0;
    $loop2do = count($arrPlans);
    for ($idx = 0; $idx < $loop2do; $idx++) {
        if ($arrPlans[$idx]['id'] == $testplanID) {
            $found = 1;
            $index = $idx;
예제 #6
0
    $gui->do_report['status_ok'] = 0;
    $gui->do_report['msg'] = lang_get('report_tplan_has_no_build');
}
// -----------------------------------------------------------------------------
// get navigation data
$gui->menuItems = array();
$gui->tplans = array();
if ($gui->do_report['status_ok']) {
    // create a list or reports
    $gui->menuItems = $reports_mgr->get_list_reports($btsEnabled, $args->optReqs, $tlCfg->reports_formats[$args->format]);
}
// BUGID 3370
// get All test Plans for combobox
$filters = array('plan_status' => $args->show_only_active_tplans ? 1 : null);
$options = array('outputType' => 'forHMLSelect');
$gui->tplans = $tproject_mgr->get_all_testplans($args->tproject_id, $filters, $options);
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->assign('arrReportTypes', localize_array($tlCfg->reports_formats));
$smarty->assign('selectedReportType', $args->format);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
/**
 * 
 *
 */
function init_args()
{
    // BUGID 3370
    $iParams = array("format" => array(tlInputParameter::INT_N), "tplan_id" => array(tlInputParameter::INT_N), "show_inactive_tplans" => array(tlInputParameter::CB_BOOL));
    $args = new stdClass();
    R_PARAMS($iParams, $args);