예제 #1
0
     $gui->name = $tc_info[0]['name'];
     $gui->tproject_id = $args->tproject_id;
     $smarty->assign('gui', $gui);
     $templateCfg = templateConfiguration('tcMove');
     $smarty->display($templateCfg->template_dir . $templateCfg->default_template);
 } else {
     if ($args->do_move) {
         $result = $tree_mgr->change_parent($args->tcase_id, $args->new_container_id);
         $tree_mgr->change_child_order($args->new_container_id, $args->tcase_id, $args->target_position, $cfg->exclude_node_types);
         $gui->refreshTree = $args->refreshTree;
         $gui->modify_tc_rights = $_SESSION['currentUser']->hasRight($db, "mgt_modify_tc", $args->tproject_id);
         // $tsuite_mgr->show($smarty,$args->tproject_id,$gui,$templateCfg->template_dir,$args->old_container_id);
         $identity = new stdClass();
         $identity->tproject_id = $args->tproject_id;
         $identity->id = $args->old_container_id;
         $tsuite_mgr->show($smarty, $gui, $identity);
     } else {
         if ($args->do_copy) {
             $user_feedback = '';
             $msg = '';
             $options = array('check_duplicate_name' => config_get('check_names_for_duplicates'), 'action_on_duplicate_name' => config_get('action_on_duplicate_name'), 'copy_also' => $args->copy);
             $result = $tcase_mgr->copy_to($args->tcase_id, $args->new_container_id, $args->user_id, $options);
             $msg = $result['msg'];
             if ($result['status_ok']) {
                 $tree_mgr->change_child_order($args->new_container_id, $result['id'], $args->target_position, $cfg->exclude_node_types);
                 $ts_sep = config_get('testsuite_sep');
                 $tc_info = $tcase_mgr->get_by_id($args->tcase_id);
                 $container_info = $tree_mgr->get_node_hierarchy_info($args->new_container_id);
                 $container_path = $tree_mgr->get_path($args->new_container_id);
                 $path = '';
                 foreach ($container_path as $key => $value) {
예제 #2
0
     $gui->array_container = $the_xx;
     $gui->old_container = $the_tc_node['parent_id'];
     // original container
     $gui->testsuite_id = $the_tc_node['parent_id'];
     $gui->testcase_id = $args->tcase_id;
     $gui->name = $tc_info[0]['name'];
     $gui->testcase_name = $tcase_mgr->generateTimeStampName($gui->name);
     $smarty->assign('gui', $gui);
     $templateCfg = templateConfiguration('tcMove');
     $smarty->display($templateCfg->template_dir . $templateCfg->default_template);
 } else {
     if ($args->do_move) {
         $result = $tree_mgr->change_parent($args->tcase_id, $args->new_container_id);
         $tree_mgr->change_child_order($args->new_container_id, $args->tcase_id, $args->target_position, $cfg->exclude_node_types);
         $gui->refreshTree = $args->refreshTree;
         $tsuite_mgr->show($smarty, $gui, $templateCfg->template_dir, $args->old_container_id);
     } else {
         if ($args->do_copy || $args->do_copy_ghost_zone) {
             $args->stepAsGhost = $args->do_copy_ghost_zone;
             $user_feedback = '';
             $msg = '';
             $action_result = 'copied';
             $options = array('check_duplicate_name' => config_get('check_names_for_duplicates'), 'action_on_duplicate_name' => config_get('action_on_duplicate_name'), 'copy_also' => $args->copy, 'stepAsGhost' => $args->do_copy_ghost_zone, 'use_this_name' => $args->name);
             $result = $tcase_mgr->copy_to($args->tcase_id, $args->new_container_id, $args->user_id, $options);
             $msg = $result['msg'];
             if ($result['status_ok']) {
                 $tree_mgr->change_child_order($args->new_container_id, $result['id'], $args->target_position, $cfg->exclude_node_types);
                 $ts_sep = config_get('testsuite_sep');
                 $tc_info = $tcase_mgr->get_by_id($args->tcase_id);
                 $container_info = $tree_mgr->get_node_hierarchy_info($args->new_container_id);
                 $container_path = $tree_mgr->get_path($args->new_container_id);