本文整理汇总了PHP中testplan::copy_as方法的典型用法代码示例。如果您正苦于以下问题:PHP testplan::copy_as方法的具体用法?PHP testplan::copy_as怎么用?PHP testplan::copy_as使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testplan
的用法示例。
在下文中一共展示了testplan::copy_as方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: copy_testplans
/**
*
*
*/
private function copy_testplans($source_id, $target_id, $user_id, $mappings)
{
static $tplanMgr;
$tplanSet = $this->get_all_testplans($source_id);
if (!is_null($tplanSet)) {
$keySet = array_keys($tplanSet);
if (is_null($tplanMgr)) {
$tplanMgr = new testplan($this->db);
}
foreach ($keySet as $itemID) {
$new_id = $tplanMgr->create($tplanSet[$itemID]['name'], $tplanSet[$itemID]['notes'], $target_id, $tplanSet[$itemID]['active'], $tplanSet[$itemID]['is_public']);
if ($new_id > 0) {
// TICKET 5190: Copy Test projects - tester assignments to testplan+build are not copied
$tplanMgr->copy_as($itemID, $new_id, null, $target_id, $user_id, array('copy_assigned_to' => 1), $mappings);
}
}
}
}
示例2: copy_testplans
/**
*
*
*/
private function copy_testplans($source_id, $target_id, $user_id, $mappings)
{
static $tplanMgr;
$tplanSet = $this->get_all_testplans($source_id);
if (!is_null($tplanSet)) {
$keySet = array_keys($tplanSet);
if (is_null($tplanMgr)) {
$tplanMgr = new testplan($this->db);
}
foreach ($keySet as $itemID) {
$new_id = $tplanMgr->create($tplanSet[$itemID]['name'], $tplanSet[$itemID]['notes'], $target_id, $tplanSet[$itemID]['active'], $tplanSet[$itemID]['is_public']);
if ($new_id > 0) {
$tplanMgr->copy_as($itemID, $new_id, null, $target_id, $user_id, null, $mappings);
}
}
}
}
示例3: logAuditEvent
if ($new_tplan_id == 0) {
$gui->user_feedback = $db->error_msg();
} else {
logAuditEvent(TLS("audit_testplan_created", $args->tproject_name, $args->testplan_name), "CREATED", $new_tplan_id, "testplans");
$cf_map = $tplan_mgr->get_linked_cfields_at_design($new_tplan_id, $args->tproject_id);
$tplan_mgr->cfield_mgr->design_values_to_db($_REQUEST, $new_tplan_id, $cf_map);
$status_ok = true;
$template = null;
$gui->user_feedback = '';
if ($args->rights == 'on') {
$result = insertTestPlanUserRight($db, $new_tplan_id, $args->user_id);
}
if ($args->copy) {
// BUGID 3485: "Create from existing Test Plan" always copies builds
$options = array('items2copy' => $args->copy_options, 'copy_assigned_to' => $args->copy_assigned_to, 'tcversion_type' => $args->tcversion_type);
$tplan_mgr->copy_as($args->source_tplanid, $new_tplan_id, $args->testplan_name, $args->tproject_id, $args->user_id, $options);
}
}
} else {
$gui->user_feedback = lang_get("warning_duplicate_tplan_name");
}
if (!$status_ok) {
// $gui->tplan_id=$new_tplan_id;
$gui->tproject_name = $args->tproject_name;
$gui->notes = $of->CreateHTML();
}
break;
}
switch ($args->do_action) {
case "do_create":
case "do_delete":