Пример #1
0
function getLastExecution(&$dbHandler, $tcase_id, $tcversion_id, $guiObj, $argsObj, &$tcaseMgr)
{
    // 20090716 - franciscom - get_last_execution() interface changes
    $options = array('getNoExecutions' => 1, 'groupByBuild' => 0);
    $last_exec = $tcaseMgr->get_last_execution($tcase_id, $tcversion_id, $argsObj->tplan_id, $argsObj->build_id, $argsObj->platform_id, $options);
    if (!is_null($last_exec)) {
        $last_exec = setTesterAssignment($dbHandler, $last_exec, $tcaseMgr, $argsObj->tplan_id, $argsObj->platform_id);
        // Warning: setCanExecute() must be called AFTER setTesterAssignment()
        $can_execute = $guiObj->grants->execute && $guiObj->build_is_open;
        $last_exec = setCanExecute($last_exec, $guiObj->exec_mode, $can_execute, $argsObj->user_id);
    }
    // Reorder executions to mantaing correct visualization order.
    if (is_array($tcversion_id)) {
        $last_exec = reorderExecutions($tcversion_id, $last_exec);
    }
    return $last_exec;
}
Пример #2
0
function getLastExecution(&$dbHandler, $tcase_id, $tcversion_id, $guiObj, $argsObj, &$tcaseMgr, $stdImages)
{
    $options = array('getNoExecutions' => 1, 'groupByBuild' => 0);
    $last_exec = $tcaseMgr->get_last_execution($tcase_id, $tcversion_id, $argsObj->tplan_id, $argsObj->build_id, $argsObj->platform_id, $options);
    if (!is_null($last_exec)) {
        $last_exec = setTesterAssignment($dbHandler, $last_exec, $tcaseMgr, $argsObj->tplan_id, $argsObj->platform_id, $argsObj->build_id);
        // Warning: setCanExecute() must be called AFTER setTesterAssignment()
        $can_execute = $guiObj->grants->execute && $guiObj->build_is_open;
        $last_exec = setCanExecute($last_exec, $guiObj->exec_mode, $can_execute, $argsObj->user_id);
        // do we need this ?
        $last_exec = testcase::addExecIcons($last_exec, $stdImages, 'bizzare');
    }
    // Reorder executions to mantaing correct visualization order.
    if (is_array($tcversion_id)) {
        $last_exec = reorderExecutions($tcversion_id, $last_exec);
    }
    return $last_exec;
}