当前位置: 首页>>代码示例>>PHP>>正文


PHP testplan::get_by_id方法代码示例

本文整理汇总了PHP中testplan::get_by_id方法的典型用法代码示例。如果您正苦于以下问题:PHP testplan::get_by_id方法的具体用法?PHP testplan::get_by_id怎么用?PHP testplan::get_by_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在testplan的用法示例。


在下文中一共展示了testplan::get_by_id方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initializeGui

/**
 * 
 */
function initializeGui(&$dbHandler, $args)
{
    $locale = isset($_SESSION['locale']) ? $_SESSION['locale'] : 'en_GB';
    $localesDateFormat = config_get('locales_date_format');
    $date_format = $localesDateFormat[$locale];
    $gui = new stdClass();
    $tplan_mgr = new testplan($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $gui_open = config_get('gui_separator_open');
    $gui_close = config_get('gui_separator_close');
    $gui->str_option_any = $gui_open . lang_get('any') . $gui_close;
    $gui->str_option_none = $gui_open . lang_get('nobody') . $gui_close;
    $gui->tplan_id = $args->tplan_id;
    $gui->tproject_id = $args->tproject_id;
    $tplan_info = $tplan_mgr->get_by_id($gui->tplan_id);
    unset($tplan_mgr);
    $gui->tplan_name = $tplan_info['name'];
    $tproject_info = $tproject_mgr->get_by_id($gui->tproject_id);
    unset($tproject_mgr);
    $gui->tproject_name = $tproject_info['name'];
    $gui->users = new stdClass();
    $gui->users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER, array(TL_USER_ANYBODY => $gui->str_option_any));
    $gui->users->qty = count($gui->users->items);
    $reports_cfg = config_get('reportsCfg');
    $startDate = strftime($date_format, time() - $reports_cfg->start_date_offset);
    $gui->selected_start_date = $startDate;
    $gui->selected_start_time = $reports_cfg->start_time;
    $gui->selected_end_date = strftime($date_format, time());
    $gui->selected_end_time = null;
    return $gui;
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:34,代码来源:tcCreatedPerUserGUI.php

示例2: initializeGui

function initializeGui(&$dbHandler, $args)
{
    $gui = new stdClass();
    $tplan_mgr = new testplan($dbHandler);
    $gui_open = config_get('gui_separator_open');
    $gui_close = config_get('gui_separator_close');
    $gui->str_option_any = $gui_open . lang_get('any') . $gui_close;
    $gui->str_option_none = $gui_open . lang_get('nobody') . $gui_close;
    $gui->tplan_id = $args->tplan_id;
    $gui->tproject_id = $args->tproject_id;
    $tplan_info = $tplan_mgr->get_by_id($gui->tplan_id);
    $gui->tplan_name = $tplan_info['name'];
    unset($tplan_info);
    $ni = $tplan_mgr->tree_manager->get_node_hierarchy_info($gui->tproject_id);
    $gui->tproject_name = $ni['name'];
    unset($ni);
    $gui->assigned_users = new stdClass();
    $gui->keywords = new stdClass();
    $gui->builds = new stdClass();
    $gui->platforms = new stdClass();
    $gui->testsuites = new stdClass();
    // 20090107 - franciscom
    // Show only users that are able to execute test cases ?
    // What happens if a user that has loose right to execute, but
    // before loosing this right has been assigned some tests, or have executed it?
    //
    // $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER, ADD_BLANK_OPTION);
    // $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER,
    // 	                                                   array(TL_USER_ANYBODY => $gui->str_option_any,
    //                                                            TL_USER_NOBODY => $gui->str_option_none) );
    //
    $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER, array(TL_USER_ANYBODY => $gui->str_option_any));
    $gui->builds->items = $tplan_mgr->get_builds($gui->tplan_id, testplan::ACTIVE_BUILDS);
    $gui->platforms->items = $tplan_mgr->getPlatforms($gui->tplan_id);
    $gui->testsuites->items = $tplan_mgr->getRootTestSuites($gui->tplan_id, $gui->tproject_id, array('output' => 'plain'));
    $gui->keywords->items[0] = $gui->str_option_any;
    if (!is_null($tplan_keywords_map = $tplan_mgr->get_keywords_map($gui->tplan_id))) {
        $gui->keywords->items += $tplan_keywords_map;
    }
    $key2loop = array('keywords', 'builds', 'platforms', 'testsuites', 'assigned_users');
    foreach ($key2loop as $kx) {
        $gui->{$kx}->qty = count($gui->{$kx}->items);
    }
    $gui->status_code_label = get_status_for_reports_html_options();
    $gui->report_type = $args->format;
    $reports_cfg = config_get('reportsCfg');
    $ldf = config_get('locales_date_format');
    $date_format = $ldf[isset($_SESSION['locale']) ? $_SESSION['locale'] : 'en_GB'];
    $gui->selected_start_date = strftime($date_format, time() - $reports_cfg->start_date_offset);
    $gui->selected_start_time = $reports_cfg->start_time;
    $gui->selected_end_date = strftime($date_format, time());
    $gui->selected_end_time = null;
    return $gui;
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:54,代码来源:resultsMoreBuildsGUI.php

示例3: initializeGui

function initializeGui(&$dbHandler, $args)
{
    $gui = new stdClass();
    $tplan_mgr = new testplan($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $gui_open = config_get('gui_separator_open');
    $gui_close = config_get('gui_separator_close');
    $gui->str_option_any = $gui_open . lang_get('any') . $gui_close;
    $gui->str_option_none = $gui_open . lang_get('nobody') . $gui_close;
    $gui->tplan_id = $args->tplan_id;
    $gui->tproject_id = $args->tproject_id;
    $tplan_info = $tplan_mgr->get_by_id($gui->tplan_id);
    $gui->tplan_name = $tplan_info['name'];
    $tproject_info = $tproject_mgr->get_by_id($gui->tproject_id);
    $gui->tproject_name = $tproject_info['name'];
    $re = new results($dbHandler, $tplan_mgr, $tproject_info, $tplan_info);
    $gui->assigned_users = new stdClass();
    $gui->keywords = new stdClass();
    $gui->builds = new stdClass();
    $gui->testsuites = new stdClass();
    // 20090107 - franciscom
    // Show only users that are able to execute test cases ?
    // What happens if a user that has loose right to execute, but
    // before loosing this right has been assigned some tests, or have executed it?
    //
    // $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER, ADD_BLANK_OPTION);
    // $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER,
    // 	                                                   array(TL_USER_ANYBODY => $gui->str_option_any,
    //                                                            TL_USER_NOBODY => $gui->str_option_none) );
    //
    $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER, array(TL_USER_ANYBODY => $gui->str_option_any));
    $gui->assigned_users->qty = count($gui->assigned_users->items);
    // BUGID 2012 - franciscom
    $gui->keywords->items[0] = $gui->str_option_any;
    if (!is_null($tplan_keywords_map = $tplan_mgr->get_keywords_map($gui->tplan_id))) {
        $gui->keywords->items += $tplan_keywords_map;
    }
    $gui->builds->items = $tplan_mgr->get_builds($gui->tplan_id, testplan::ACTIVE_BUILDS);
    $gui->testsuites->items = $re->getTopLevelSuites();
    $gui->keywords->qty = count($gui->keywords->items);
    $gui->builds->qty = count($gui->builds->items);
    $gui->testsuites->qty = count($gui->testsuites->items);
    $gui->status_code_label = get_status_for_reports_html_options();
    $gui->report_type = $args->format;
    $reports_cfg = config_get('reportsCfg');
    $startDate = time() - $reports_cfg->start_date_offset;
    $gui->selected_start_date = $startDate;
    $gui->selected_start_time = $reports_cfg->start_time;
    $gui->selected_end_date = null;
    $gui->selected_end_time = null;
    return $gui;
}
开发者ID:tamtrong,项目名称:testlink,代码行数:52,代码来源:resultsMoreBuildsGUI.php

示例4: init_args

function init_args(&$dbHandler)
{
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $args = new stdClass();
    $args->target_date = null;
    $args->start_date = null;
    // Important!!!
    // name of these variables is generated by smarty (See html_select_date in Smarty Manual)
    $date_vars = array('target_date_Year', 'target_date_Month', 'target_date_Day');
    $start_date_vars = array('start_date_Year', 'start_date_Month', 'start_date_Day');
    $create_date = true;
    $create_start_date = true;
    foreach ($date_vars as $my) {
        ${$my} = isset($_REQUEST[$my]) ? $_REQUEST[$my] : null;
        $create_date = $create_date && !is_null(${$my}) && trim(${$my}) != '';
    }
    if ($create_date) {
        $args->target_date = $target_date_Year . "-" . $target_date_Month . "-" . $target_date_Day;
    }
    foreach ($start_date_vars as $my) {
        ${$my} = isset($_REQUEST[$my]) ? $_REQUEST[$my] : null;
        $create_start_date = $create_start_date && !is_null(${$my}) && trim(${$my}) != '';
    }
    if ($create_start_date) {
        $args->start_date = $start_date_Year . "-" . $start_date_Month . "-" . $start_date_Day;
    }
    $key2loop = array('low_priority_tcases', 'medium_priority_tcases', 'high_priority_tcases');
    foreach ($key2loop as $key) {
        $args->{$key} = isset($_REQUEST[$key]) ? intval($_REQUEST[$key]) : 0;
    }
    $args->id = isset($_REQUEST['id']) ? $_REQUEST['id'] : 0;
    $args->name = isset($_REQUEST['milestone_name']) ? $_REQUEST['milestone_name'] : null;
    $args->doAction = isset($_REQUEST['doAction']) ? $_REQUEST['doAction'] : null;
    $args->basehref = $_SESSION['basehref'];
    $args->tproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0;
    $args->tproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : "";
    $args->tplan_name = '';
    $args->tplan_id = isset($_REQUEST['tplan_id']) ? $_REQUEST['tplan_id'] : 0;
    if ($args->tplan_id == 0) {
        $args->tplan_id = isset($_SESSION['testplanID']) ? $_SESSION['testplanID'] : 0;
    }
    if ($args->tplan_id > 0) {
        $tplan_mgr = new testplan($dbHandler);
        $info = $tplan_mgr->get_by_id($args->tplan_id);
        $args->tplan_name = $info['name'];
    }
    return $args;
}
开发者ID:tamtrong,项目名称:testlink,代码行数:48,代码来源:planMilestonesEdit.php

示例5: init_args

function init_args(&$dbHandler, $dateFormat)
{
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $args = new stdClass();
    $args->target_date_original = isset($_REQUEST['target_date']) ? $_REQUEST['target_date'] : null;
    $args->start_date_original = isset($_REQUEST['start_date']) ? $_REQUEST['start_date'] : null;
    // convert target date to iso format to write to db
    if (isset($_REQUEST['target_date']) && $_REQUEST['target_date'] != '') {
        $date_array = split_localized_date($_REQUEST['target_date'], $dateFormat);
        if ($date_array != null) {
            // set date in iso format
            $args->target_date = $date_array['year'] . "-" . $date_array['month'] . "-" . $date_array['day'];
        }
    }
    // convert start date to iso format to write to db
    if (isset($_REQUEST['start_date']) && $_REQUEST['start_date'] != '') {
        $date_array = split_localized_date($_REQUEST['start_date'], $dateFormat);
        if ($date_array != null) {
            // set date in iso format
            $args->start_date = $date_array['year'] . "-" . $date_array['month'] . "-" . $date_array['day'];
        }
    }
    $key2loop = array('low_priority_tcases', 'medium_priority_tcases', 'high_priority_tcases');
    foreach ($key2loop as $key) {
        $args->{$key} = isset($_REQUEST[$key]) ? intval($_REQUEST[$key]) : 0;
    }
    $args->id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
    $args->name = isset($_REQUEST['milestone_name']) ? $_REQUEST['milestone_name'] : null;
    $args->doAction = isset($_REQUEST['doAction']) ? $_REQUEST['doAction'] : null;
    $args->basehref = $_SESSION['basehref'];
    $args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
    $args->tproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : "";
    $args->tplan_name = '';
    $args->tplan_id = isset($_REQUEST['tplan_id']) ? intval($_REQUEST['tplan_id']) : 0;
    if ($args->tplan_id == 0) {
        $args->tplan_id = isset($_SESSION['testplanID']) ? intval($_SESSION['testplanID']) : 0;
    }
    if ($args->tplan_id > 0) {
        $tplan_mgr = new testplan($dbHandler);
        $info = $tplan_mgr->get_by_id($args->tplan_id);
        $args->tplan_name = $info['name'];
    }
    return $args;
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:44,代码来源:planMilestonesEdit.php

示例6: initializeGui

function initializeGui(&$dbHandler, &$argsObj, &$userObj, &$tprojectMgr)
{
    $tcaseCfg = config_get('testcase_cfg');
    $guiObj = new stdClass();
    $guiObj->can_manage_testplans = $userObj->hasRight($dbHandler, "mgt_testplan_create", $argsObj->tproject_id, $argsObj->tplan_id);
    $guiObj->show_details = 0;
    $guiObj->user_feedback = '';
    $guiObj->tcasePrefix = $tprojectMgr->getTestCasePrefix($argsObj->tproject_id) . $tcaseCfg->glue_character;
    $guiObj->tproject_name = $argsObj->tproject_name;
    $tplanMgr = new testplan($dbHandler);
    $tplan_info = $tplanMgr->get_by_id($argsObj->tplan_id);
    $guiObj->tplan_name = $tplan_info['name'];
    $guiObj->tplan_id = $argsObj->tplan_id;
    $guiObj->tproject_id = $argsObj->tproject_id;
    $guiObj->testcases = $tplanMgr->get_linked_and_newest_tcversions($argsObj->tplan_id);
    $linked_tcases = $tplanMgr->get_linked_items_id($argsObj->tplan_id);
    $guiObj->doIt = count($linked_tcases) > 0;
    $guiObj->tplans = array();
    $tplans = $userObj->getAccessibleTestPlans($dbHandler, $argsObj->tproject_id);
    foreach ($tplans as $key => $value) {
        $guiObj->tplans[$value['id']] = $value['name'];
    }
    return $guiObj;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:24,代码来源:newest_tcversions.php

示例7: init_args

function init_args(&$dbHandler, &$treeMgr)
{
    $iParams = array("format" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N), "tplan_id" => array(tlInputParameter::INT_N), "type" => array(tlInputParameter::STRING_N, 0, 1));
    $argsObj = new stdClass();
    R_PARAMS($iParams, $argsObj);
    $argsObj->doIt = false;
    $argsObj->showPlatforms = false;
    $argsObj->tproject_name = '';
    if ($argsObj->tproject_id > 0) {
        $dummy = $treeMgr->get_node_hierarchy_info($argsObj->tproject_id);
        $argsObj->tproject_name = $dummy['name'];
    }
    $argsObj->tplan_name = '';
    if ($argsObj->tplan_id > 0) {
        $tplan_mgr = new testplan($dbHandler);
        $tplan_info = $tplan_mgr->get_by_id($argsObj->tplan_id);
        $argsObj->tplan_name = $tplan_info['name'];
        $argsObj->doIt = $tplan_mgr->count_testcases($argsObj->tplan_id) > 0;
        $argsObj->showPlatforms = $tplan_mgr->hasLinkedPlatforms($argsObj->tplan_id);
        $getOpt = array('outputFormat' => 'map');
        $argsObj->platforms = $tplan_mgr->getPlatforms($argsObj->tplan_id, $getOpt);
        unset($tplan_mgr);
    }
    return $argsObj;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:25,代码来源:testCasesWithCF.php

示例8: init_setting_testplan

 /**
  * 
  * 
  */
 private function init_setting_testplan()
 {
     if (is_null($this->testplan_mgr)) {
         $this->testplan_mgr = new testplan($this->db);
     }
     $key = 'setting_testplan';
     $testplans = $this->user->getAccessibleTestPlans($this->db, $this->args->testproject_id);
     if (isset($_SESSION['testplanID']) && $_SESSION['testplanID'] != $this->args->{$key}) {
         // testplan was changed, we need to reset all filters
         // --> they were chosen for another testplan, not this one!
         $this->args->reset_filters = true;
         // check if user is allowed to set chosen testplan before changing
         foreach ($testplans as $plan) {
             if ($plan['id'] == $this->args->{$key}) {
                 setSessionTestPlan($plan);
             }
         }
     }
     // now load info from session
     $info = $this->testplan_mgr->get_by_id($_SESSION['testplanID']);
     $this->args->testplan_name = $info['name'];
     $this->args->testplan_id = $info['id'];
     $this->args->{$key} = $info['id'];
     $this->settings[$key]['selected'] = $info['id'];
     // Final filtering based on mode:
     // Now get all selectable testplans for the user to display.
     // For execution:
     // For assign test case execution feature:
     //     don't take testplans into selection which have no (active/open) builds!
     //
     // For plan add mode:
     //     add every plan no matter if he has builds or not.
     foreach ($testplans as $plan) {
         $add_plan = $this->mode == 'plan_add_mode' || $this->mode == 'plan_mode' && $this->args->feature != 'tc_exec_assignment';
         if (!$add_plan) {
             $builds = $this->testplan_mgr->get_builds($plan['id'], testplan::GET_ACTIVE_BUILD, testplan::GET_OPEN_BUILD);
             $add_plan = is_array($builds) && count($builds);
         }
         if ($add_plan) {
             $this->settings[$key]['items'][$plan['id']] = $plan['name'];
         }
     }
 }
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:47,代码来源:tlTestCaseFilterControl.class.php

示例9: templateConfiguration

 * 20100716 - eloff - BUGID 3562: include bug tracking if activated
 * 20100221 - franciscom - fixed call to getPlatforms()	
 */
require_once '../../config.inc.php';
require_once 'common.php';
if (config_get('interface_bugs') != 'NO') {
    require_once TL_ABS_PATH . 'lib' . DIRECTORY_SEPARATOR . 'bugtracking' . DIRECTORY_SEPARATOR . 'int_bugtracking.php';
}
testlinkInitPage($db);
$templateCfg = templateConfiguration();
$gui = new stdClass();
$tplan_mgr = new testplan($db);
$tproject_mgr = new testproject($db);
$gui->tplan_id = intval($_REQUEST['tplan_id']);
$gui->tproject_id = intval($_REQUEST['tproject_id']);
$tplan_info = $tplan_mgr->get_by_id($gui->tplan_id);
$tproject_info = $tproject_mgr->get_by_id($gui->tproject_id);
// ??
// $tplan_mgr->getStatusTotalsByPlatform($gui->tplan_id);
$gui->can_use_charts = checkLibGd();
$totals = $tplan_mgr->getStatusTotals($gui->tplan_id);
if ($gui->can_use_charts == 'OK') {
    $gui->tplan_name = $tplan_info['name'];
    $gui->tproject_name = $tproject_info['name'];
    $resultsCfg = config_get('results');
    // Save in session to improve perfomance.
    // This data will be used in different *chart.php to generate on the fly image
    unset($_SESSION['statistics']);
    $re = new results($db, $tplan_mgr, $tproject_info, $tplan_info, ALL_TEST_SUITES, ALL_BUILDS, ALL_PLATFORMS);
    $_SESSION['statistics']['getTopLevelSuites'] = $re->getTopLevelSuites();
    $_SESSION['statistics']['getAggregateMap'] = $re->getAggregateMap();
开发者ID:moraesmv,项目名称:testlink-code,代码行数:31,代码来源:charts.php

示例10: init_args

function init_args(&$dbHandler)
{
    $argsObj = new stdClass();
    $argsObj->doIt = false;
    $argsObj->showPlatforms = false;
    $argsObj->tproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0;
    $argsObj->tproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : '';
    $argsObj->tplan_name = '';
    $argsObj->tplan_id = isset($_REQUEST['tplan_id']) ? $_REQUEST['tplan_id'] : 0;
    if ($argsObj->tplan_id == 0) {
        $argsObj->tplan_id = isset($_SESSION['testplanID']) ? $_SESSION['testplanID'] : 0;
    }
    if ($argsObj->tplan_id > 0) {
        $tplan_mgr = new testplan($dbHandler);
        $tplan_info = $tplan_mgr->get_by_id($argsObj->tplan_id);
        $argsObj->tplan_name = $tplan_info['name'];
        $argsObj->doIt = $tplan_mgr->count_testcases($argsObj->tplan_id) > 0;
        $argsObj->showPlatforms = $tplan_mgr->hasLinkedPlatforms($argsObj->tplan_id);
        unset($tplan_mgr);
    }
    return $argsObj;
}
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:22,代码来源:testCasesWithCF.php

示例11: init_args

/**
 * get user input and create an object with properties representing this inputs.
 * @return stdClass object 
 */
function init_args(&$dbHandler)
{
    $args = new stdClass();
    $iParams = array("tplan_id" => array(tlInputParameter::INT_N), "format" => array(tlInputParameter::INT_N, 999), "type" => array(tlInputParameter::STRING_N, 0, 100), "activity" => array(tlInputParameter::STRING_N, 1, 10));
    $l18n = array();
    $l18n['addTC'] = lang_get('navigator_add_remove_tcase_to_tplan');
    $l18n['test_plan'] = lang_get('test_plan');
    R_PARAMS($iParams, $args);
    $args->tproject_id = intval(isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0);
    $args->tproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : '';
    $args->basehref = $_SESSION['basehref'];
    $args->testprojectOptReqs = $_SESSION['testprojectOptions']->requirementsEnabled;
    $args->format = is_null($args->format) ? FORMAT_HTML : $args->format;
    $args->type = is_null($args->type) ? DOC_TEST_PLAN_DESIGN : $args->type;
    $args->doc_type = $args->type;
    // Changes to call this page also in add/remove test cases feature
    $args->showOptions = true;
    $args->showHelpIcon = true;
    $args->tplan_info = null;
    $args->mainTitle = '';
    if (($args->tplan_id = intval($args->tplan_id)) <= 0 || $args->activity != '') {
        $args->showOptions = false;
        $args->showHelpIcon = false;
        $args->tplan_id = intval(isset($_SESSION['testplanID']) ? intval($_SESSION['testplanID']) : 0);
        if ($args->tplan_id > 0) {
            $tplan_mgr = new testplan($dbHandler);
            $args->tplan_info = $tplan_mgr->get_by_id($args->tplan_id);
            $args->mainTitle = $l18n['test_plan'] . ': ' . $args->tplan_info['name'];
        }
    }
    return $args;
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:36,代码来源:printDocOptions.php

示例12: testplan

<?php

//@TODO this file seems not to be in use
include "../../third_party/charts/charts.php";
require_once '../functions/results.class.php';
require_once '../functions/testplan.class.php';
testlinkInitPage($db);
$tplan_mgr = new testplan($db);
$tproject_mgr = new testproject($db);
$tplan_id = $_REQUEST['tplan_id'];
$tproject_id = $_SESSION['testprojectID'];
$tplan_info = $tplan_mgr->get_by_id($tplan_id);
$tproject_info = $tproject_mgr->get_by_id($tproject_id);
$re = new results($db, $tplan_mgr, $tproject_info, $tplan_info, ALL_TEST_SUITES, ALL_BUILDS);
/**
* KEYWORDS REPORT
*/
$arrDataKeys = $re->getAggregateKeywordResults();
$i = 0;
$arrDataKeys2 = null;
if ($arrDataKeys != null) {
    while ($keywordId = key($arrDataKeys)) {
        $arr = $arrDataKeys[$keywordId];
        $arrDataKeys2[$i] = $arr;
        $i++;
        next($arrDataKeys);
    }
}
$namesOfKeywordsArray = array();
$namesOfKeywordsArray[0] = "";
$passArray = array();
开发者ID:tamtrong,项目名称:testlink,代码行数:31,代码来源:priorityBarChart.php

示例13: launch_inner_exec

/**
 * 
 *
 */
function launch_inner_exec(&$dbHandler, &$tplMgr)
{
    $itemCode = array('exec' => 'lib/execute/execNavigator.php');
    $op = array('status_ok' => true, 'msg' => '');
    // First check for keys in _GET that MUST EXIST
    // key: key on _GET, value: labelID defined on strings.txt
    $mandatoryKeys = array('item' => 'item_not_set', 'build_id' => 'build_id_not_set');
    foreach ($mandatoryKeys as $key => $labelID) {
        $op['status_ok'] = isset($_GET[$key]);
        if (!$op['status_ok']) {
            $op['msg'] = lang_get($labelID);
            break;
        }
    }
    if ($op['status_ok']) {
        $op['status_ok'] = isset($_GET['feature_id']);
        if (!$op['status_ok']) {
            $keySet = array('tplan_id' => 'testplan_not_set', 'tcversion_id' => 'tcversion_id', 'platform_id' => 'platform_id_not_set');
            foreach ($keySet as $key => $labelID) {
                $op['status_ok'] = isset($_GET[$key]);
                if (!$op['status_ok']) {
                    $op['msg'] = lang_get($labelID);
                    break;
                }
            }
        }
    }
    $args = init_args($dbHandler);
    if ($op['status_ok']) {
        // Set Environment
        $tplan_mgr = new testplan($dbHandler);
        $info = $tplan_mgr->get_by_id($args->tplan_id, array('output' => 'minimun'));
        if (is_null($info)) {
            die('ltx - tplan info does not exist');
        }
        $tproject_mgr = new testproject($dbHandler);
        $tproject_mgr->setSessionProject($info['tproject_id']);
        $op['status_ok'] = true;
    }
    if ($op['status_ok']) {
        // Build  name of function to call for doing the job.
        $pfn = 'process_' . $args->item;
        $ctx = array();
        $ctx['setting_testplan'] = $args->tplan_id;
        $ctx['setting_build'] = $args->build_id;
        $ctx['setting_platform'] = $args->platform_id;
        $ctx['tcversion_id'] = $args->tcversion_id;
        $ctx['tcase_id'] = 0;
        $ctx['user_id'] = $args->user_id;
        $jump_to = $pfn($dbHandler, $ctx);
        $op['status_ok'] = !is_null($jump_to['url']);
        $op['msg'] = $jump_to['msg'];
    }
    if ($op['status_ok']) {
        $treeframe = $itemCode[$args->item] . '?loadExecDashboard=0' . '&setting_testplan=' . $args->tplan_id . '&setting_build=' . $args->build_id . '&setting_platform=' . $args->platform_id;
        $tplMgr->assign('title', lang_get('main_page_title'));
        $tplMgr->assign('treewidth', TL_FRMWORKAREA_LEFT_FRAME_WIDTH);
        $tplMgr->assign('workframe', $jump_to['url']);
        $tplMgr->assign('treeframe', $treeframe);
        $tplMgr->display('frmInner.tpl');
    } else {
        echo $op['msg'];
        ob_end_flush();
        exit;
    }
}
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:70,代码来源:ltx.php

示例14: array

tLog('Active Builds count = ' . $build_count);
if ($build_count == 0) {
    // Test plan without builds can have execution data
    $gui->do_report['status_ok'] = 0;
    $gui->do_report['msg'] = lang_get('report_tplan_has_no_build');
}
// -----------------------------------------------------------------------------
// get navigation data
$gui->menuItems = array();
if ($gui->do_report['status_ok']) {
    // create a list or reports
    $context = new stdClass();
    $context->tproject_id = $args->tproject_id;
    $context->tplan_id = $args->tplan_id;
    $tplan_mgr = new testplan($db);
    $dmy = $tplan_mgr->get_by_id($context->tplan_id);
    $gui->buildInfoSet = $tplan_mgr->get_builds($gui->tplan_id);
    $report_plans = $tplan_mgr->report_get_plans($args->tproject_id);
    $report_suites = $tplan_mgr->report_get_suites($args->tproject_id);
    $report_builds = $tplan_mgr->report_get_builds();
    $report_build_total = count($report_builds);
    $report_devices = $tplan_mgr->report_get_devices($args->tproject_id);
    $report_device_total = count($report_devices);
    unset($tplan_mgr);
    $context->apikey = $dmy['api_key'];
    // $context->apikey = $_SESSION['currentUser']->userApiKey;
    $context->imgSet = $smarty->getImages();
    $gui->menuItems = $reports_mgr->get_list_reports($context, $gui->btsEnabled, $args->optReqs, $tlCfg->reports_formats[$args->format]);
}
$smarty->assign('gui', $gui);
$smarty->assign('report_plans', $report_plans);
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:31,代码来源:resultsNavigator.php

示例15: init_filter_assigned_user

 private function init_filter_assigned_user()
 {
     if (!$this->testproject_mgr) {
         $this->testproject_mgr = new testproject($this->db);
     }
     if (!$this->testplan_mgr) {
         $this->testplan_mgr = new testplan($this->db);
     }
     $key = 'filter_assigned_user';
     $tplan_id = $this->settings['setting_testplan']['selected'];
     // set selection to default (any), only change if value is sent by user and reset is not requested
     $selection = $this->args->{$key};
     if (!$selection || $this->args->reset_filters) {
         $selection = null;
     } else {
         $this->do_filtering = true;
     }
     $tproject_info = $this->testproject_mgr->get_by_id($this->args->testproject_id);
     $tplan_info = $this->testplan_mgr->get_by_id($tplan_id);
     $all_testers = tlUser::getTestersForHtmlOptions($this->db, $tplan_info, $tproject_info, null, array(TL_USER_ANYBODY => $this->option_strings['any'], TL_USER_NOBODY => $this->option_strings['none'], TL_USER_SOMEBODY => $this->option_strings['somebody']), 'any');
     $visible_testers = $all_testers;
     // in execution mode the rights of the user have to be considered
     if ($this->mode == 'execution_mode') {
         $role = $this->user->getEffectiveRole($this->db, $this->args->testproject_id, $tplan_id);
         $simple_tester_roles = array_flip($this->cfg->exec_cfg->simple_tester_roles);
         $right_to_execute = $role->hasRight('testplan_execute');
         $right_to_manage = $role->hasRight('testplan_planning');
         $simple = isset($simple_tester_roles[$role->dbID]) || $right_to_execute && !$right_to_manage;
         $view_mode = $simple ? $this->cfg->exec_cfg->view_mode->tester : 'all';
         if ($view_mode != 'all') {
             $visible_testers = (array) $this->user->getDisplayName();
             $selection = (array) $this->user->dbID;
         }
         // re-enable option "user_filter_default"
         if (!$selection && $this->cfg->exec_cfg->user_filter_default == 'logged_user') {
             $selection = (array) $this->user->dbID;
         }
     }
     $unaKey = 'filter_assigned_user_include_unassigned';
     $this->filters[$key] = array('items' => $visible_testers, 'selected' => $selection, $unaKey => $this->args->{$unaKey});
     // which value shall be passed to tree generation class?
     if (is_array($selection) && in_array(TL_USER_ANYBODY, $selection) || $selection == TL_USER_ANYBODY) {
         // delete user assignment filter if "any user" is part of the selection
         $this->active_filters[$key] = null;
         $this->active_filters[$unaKey] = 0;
     }
     if (is_array($selection)) {
         // get keys of the array as values
         $this->active_filters[$key] = array_flip($selection);
         foreach ($this->active_filters[$key] as $user_key => $user_value) {
             $this->active_filters[$key][$user_key] = $user_key;
         }
         $this->active_filters[$unaKey] = $this->filters[$key][$unaKey];
     }
 }
开发者ID:moraesmv,项目名称:testlink-code,代码行数:55,代码来源:tlTestCaseFilterControl.class.php


注:本文中的testplan::get_by_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。