$tree['id'] = $args->tproject_id; $tree['node_type_id'] = $hash_descr_id['testproject']; switch ($doc_info->type) { case DOC_REQ_SPEC: $docText .= renderSimpleChapter(lang_get('testproject') . " " . lang_get('scope'), $doc_info->tproject_scope); $docText .= renderSimpleChapter(lang_get('requirement_specification_report'), " "); $docText .= renderReqSpecTreeForPrinting($db, $tree, $printingOptions, null, 0, 1, $args->user_id, 0, $args->tproject_id); break; case DOC_TEST_SPEC: $docText .= renderSimpleChapter(lang_get('scope'), $doc_info->tproject_scope); // 3459 - added platform ID $docText .= renderTestSpecTreeForPrinting($db, $tree, $doc_info->content_range, $printingOptions, null, 0, 1, $args->user_id, 0, null, $args->tproject_id, $platform_id); break; case DOC_TEST_PLAN: if ($printingOptions['testplan']) { $docText .= renderSimpleChapter(lang_get('scope'), $doc_info->testplan_scope); } case DOC_TEST_REPORT: $tocPrefix++; if ($showPlatforms) { $docText .= renderPlatformHeading($tocPrefix, $platform_id, $platforms[$platform_id], $printingOptions); } // 3459 - added platform ID $docText .= renderTestPlanForPrinting($db, $tree, $doc_info->content_range, $printingOptions, $tocPrefix, 0, 1, $args->user_id, $args->tplan_id, $args->tproject_id, $platform_id); if ($doc_info->type == DOC_TEST_REPORT && $printingOptions['metrics']) { $docText .= buildTestPlanMetrics($doc_data->statistics); } break; } } }
} break; } $actionContext = (array) $args; foreach ($treeForPlatform as $platform_id => $tree2work) { $actionContext['platform_id'] = $platform_id; if (isset($tree2work['childNodes']) && sizeof($tree2work['childNodes']) > 0) { $tree2work['name'] = $args->tproject_name; $tree2work['id'] = $args->tproject_id; $tree2work['node_type_id'] = $decode['node_descr_id']['testproject']; switch ($doc_info->type) { case DOC_REQ_SPEC: $docText .= renderReqSpecTreeForPrinting($db, $tree2work, $printingOptions, null, 0, 1, $args->user_id, 0, $args->tproject_id); break; case DOC_TEST_SPEC: $docText .= renderSimpleChapter(lang_get('scope'), $doc_info->tproject_scope); $env = new stdClass(); $env->base_href = $_SESSION['basehref']; $env->item_type = $doc_info->content_range; $env->tocPrefix = null; $env->tocCounter = 0; $env->user_id = $args->user_id; $env->reportType = $doc_info->type; $actionContext['level'] = 0; $indentLevelStart = 1; $docText .= renderTestSpecTreeForPrinting($db, $tree2work, $printingOptions, $env, $actionContext, $env->tocPrefix, $indentLevelStart); /* $docText .= renderTestSpecTreeForPrinting($db, $_SESSION['basehref'], $tree2work, $doc_info->content_range, $printingOptions, null, 0, 1, $args->user_id,0,null, $args->tproject_id,$platform_id); */
/** * */ function renderTestPlanItem($info) { $lbl = init_labels(array('testplan' => null, 'scope' => null)); $out = ''; $out .= renderSimpleChapter($lbl['testplan'] . ': ' . htmlspecialchars($info->testplan_name), $info->testplan_scope, 'page-break-before: avoid;'); return $out; }