Example #1
0
require_once "common.php";
require_once "exttable.class.php";
testlinkInitPage($db);
$templateCfg = templateConfiguration();
$smarty = new TLSmarty();
$imgSet = $smarty->getImages();
$args = init_args($db);
$gui = initializeGui($db, $args);
$statusGui = getStatusGuiCfg();
// Get all test cases assigned to user without filtering by execution status
$options = new stdClass();
$options->mode = 'full_path';
$filters = initFilters($args);
$tplan_param = $args->tplan_id ? array($args->tplan_id) : testcase::ALL_TESTPLANS;
$tcase_mgr = new testcase($db);
$gui->resultSet = $tcase_mgr->get_assigned_to_user($args->user_id, $args->tproject_id, $tplan_param, $options, $filters);
$doIt = !is_null($gui->resultSet);
if ($doIt) {
    $tables = tlObjectWithDB::getDBTables(array('nodes_hierarchy'));
    $tplanSet = array_keys($gui->resultSet);
    $sql = "SELECT name,id FROM {$tables['nodes_hierarchy']} " . "WHERE id IN (" . implode(',', $tplanSet) . ")";
    $gui->tplanNames = $db->fetchRowsIntoMap($sql, 'id');
    $optColumns = array('user' => $args->show_user_column, 'priority' => $args->priority_enabled);
    $whoiam = $args->show_all_users ? 'tcAssignedToUser' : 'tcAssignedToMe';
    foreach ($gui->resultSet as $tplan_id => $tcase_set) {
        list($columns, $sortByColumn, $show_platforms) = getColumnsDefinition($db, $tplan_id, $optColumns);
        $rows = array();
        foreach ($tcase_set as $tcase_platform) {
            foreach ($tcase_platform as $tcase) {
                $current_row = array();
                $tcase_id = $tcase['testcase_id'];