if ($args->save_results || $args->do_bulk_save || $args->save_and_next) { // this has to be done to do not break logic present on write_execution() $args->save_results = $args->save_and_next ? $args->save_and_next : $args->save_results; $_REQUEST['save_results'] = $args->save_results; $submitResult = write_execution($db, $args, $_REQUEST, $gui->map_last_exec); // Need to re-read to update test case status if ($args->save_and_next) { $nextItem = $tplan_mgr->getTestCaseNextSibling($args->tplan_id, $tcversion_id, $args->platform_id); if (!is_null($nextItem)) { $tcase_id = $nextItem['tcase_id']; $tcversion_id = $nextItem['tcversion_id']; // BUGID 3478 processTestCase($nextItem, $gui, $args, $cfg, $linked_tcversions, $tree_mgr, $tcase_mgr, $attachmentRepository); } } $gui->map_last_exec = getLastExecution($db, $tcase_id, $tcversion_id, $gui, $args, $tcase_mgr); } if ($args->doDelete) { delete_execution($db, $args->exec_to_delete); } // -------------------------------------------------------------------------------------------- $gui->map_last_exec_any_build = null; $gui->other_execs = null; $testerid = null; if ($args->level == 'testcase') { // @TODO 20090815 - franciscom check what to do with platform if ($cfg->exec_cfg->show_last_exec_any_build) { // 20090716 - franciscom - get_last_execution() interface changes $options = array('getNoExecutions' => 1, 'groupByBuild' => 0); $gui->map_last_exec_any_build = $tcase_mgr->get_last_execution($tcase_id, $tcversion_id, $args->tplan_id, testcase::ANY_BUILD, $args->platform_id, $options); //Get UserID and Updater ID for current Version
if ($args->save_results || $args->do_bulk_save || $args->save_and_next) { // this has to be done to do not break logic present on writeExecToDB() $args->save_results = $args->save_and_next ? $args->save_and_next : $args->save_results; $_REQUEST['save_results'] = $args->save_results; $mgr->tcase->writeExecToDB($args, $_REQUEST); // Need to re-read to update test case status if ($args->save_and_next) { $identity = processSaveAndNext($mgr, $args, $gui, $tcversion_id); if (!is_null($identity)) { $tcase_id = $identity['tcase_id']; $tcversion_id = $identity['tcversion_id']; } } } // Important Notice: $tcase_id and $tcversions_id, can be ARRAYS when user enable bulk execution $gui->map_last_exec = getLastExecution($db, $tcase_id, $tcversion_id, $gui, $args, $mgr->tcase, $smarty->tlImages); $gui->map_last_exec_any_build = null; $gui->other_execs = null; $testerid = null; if ($args->level == 'testcase') { // @TODO 20090815 - franciscom check what to do with platform if ($gui->cfg->exec_cfg->show_last_exec_any_build) { $options = array('getNoExecutions' => 1, 'groupByBuild' => 0); $gui->map_last_exec_any_build = $mgr->tcase->get_last_execution($tcase_id, $tcversion_id, $args->tplan_id, testcase::ANY_BUILD, $args->platform_id, $options); // Get UserID and Updater ID for current Version $tc_current = $gui->map_last_exec_any_build; foreach ($tc_current as $key => $value) { $testerid = $value['tester_id']; $userid_array[$testerid] = $testerid; } }