$items2use = (object) array('estimatedExecTime' => null, 'realExecTime' => null); $treeForPlatform = array(); $filters = null; switch ($doc_info->content_range) { case 'testproject': $treeForPlatform = buildContentForTestPlan($db, $subtree, $args->tplan_id, $platformIDSet, $decode, $tplan_mgr, $filters); break; case 'testsuite': list($treeForPlatform, $items2use) = buildContentForTestPlanBranch($db, $subtree, $args->itemID, $args->tplan_id, $platformIDSet, $doc_info, $decode, $tplan_mgr, $my['options']['prepareNode']); break; } // Create list of execution id, that will be used to compute execution time if // CF_EXEC_TIME custom field exists and is linked to current testproject $doc_data->statistics = null; if ($printingOptions['metrics']) { $doc_data->statistics = timeStatistics($items2use, $args->tplan_id, $decode, $tplan_mgr); } break; } // ----- rendering logic ----- $topText = renderHTMLHeader($doc_info->type . ' ' . $doc_info->title, $_SESSION['basehref'], $doc_info->type); $topText .= renderFirstPage($doc_info); // Init table of content (TOC) data renderTOC($printingOptions); // @TODO check if is really useful $tocPrefix = null; if ($showPlatforms = !isset($treeForPlatform[0]) ? true : false) { $tocPrefix = 0; } if ($treeForPlatform) { // Things that have to be printed just once
break; case 'testsuite': $ctx->branchRoot = $args->itemID; $opx = array_merge((array) $opx, $my['options']['prepareNode']); list($treeForPlatform, $items2use) = buildContentForTestPlanBranch($db, $subtree, $ctx, $doc_info, $decode, $tplan_mgr, $opx); break; } // Create list of execution id, that will be used to compute execution time if // CF_EXEC_TIME custom field exists and is linked to current testproject $doc_data->statistics = null; if ($printingOptions['metrics']) { $target = new stdClass(); $target->tplan_id = $args->tplan_id; $target->build_id = $args->build_id; $target->platform_id = isset($args->platform_id) ? $args->platform_id : null; $doc_data->statistics = timeStatistics($items2use, $target, $decode, $tplan_mgr); } break; } // ----- rendering logic ----- $topText = renderHTMLHeader($doc_info->type . ' ' . $doc_info->title, $_SESSION['basehref'], $doc_info->type); $topText .= renderFirstPage($doc_info); // Init table of content (TOC) data renderTOC($printingOptions); // @TODO check if is really useful $tocPrefix = null; if ($showPlatforms = !isset($treeForPlatform[0]) ? true : false) { $tocPrefix = 0; } if ($treeForPlatform) { // Things that have to be printed just once