Permalink
Browse files

. #0008509: No keywords in Test Plan Report under some conditions

  • Loading branch information...
fmancardi committed Dec 23, 2018
1 parent 58aa8f6 commit 4382b344a7867fb181d80c8ca673892ad8f9fc85
Showing with 15 additions and 10 deletions.
  1. +10 −9 lib/functions/print.inc.php
  2. +5 −1 lib/results/printDocument.php
@@ -919,6 +919,8 @@ function renderTestCaseForPrinting(&$db,&$node,&$options,$env,$context,$indentLe
$tcase_pieces = null;
$id = $node['id'];
$tcversion_id = $node['tcversion_id'];
$level = $indentLevel;
$prefix = isset($context['prefix']) ? $context['prefix'] : null;
$tplan_id = isset($context['tplan_id']) ? $context['tplan_id'] : 0;
@@ -1095,7 +1097,7 @@ function renderTestCaseForPrinting(&$db,&$node,&$options,$env,$context,$indentLe
}
$tcInfo = $tc_mgr->get_by_id($id,$getByID['tcversion_id'],$getByID['filters'],
$tcInfo = $tc_mgr->get_by_id($id,$getByID['tcversion_id'],$getByID['filters'],
array('renderGhost' => true,'renderImageInline' => true));
if ($tcInfo) {
$tcInfo = $tcInfo[0];
@@ -1285,8 +1287,7 @@ function renderTestCaseForPrinting(&$db,&$node,&$options,$env,$context,$indentLe
$code .= '</tr>';
// Attachment management
if($getExecutions)
{
if($getExecutions) {
if( isset($sxni[$tcInfo[$key][$ydx]['id']]))
{
$attachInfo = getAttachmentInfos($docRepo,$sxni[$tcInfo[$key][$ydx]['id']]['id'],
@@ -1441,8 +1442,7 @@ function renderTestCaseForPrinting(&$db,&$node,&$options,$env,$context,$indentLe
// collect REQ for TC
if ($options['requirement'])
{
if ($options['requirement']) {
$requirements = (array)$req_mgr->get_all_for_tcase($id);
$code .= '<tr><td width="' . $cfg['firstColWidth'] . '" valign="top"><span class="label">'.
$labels['reqs'].'</span>';
@@ -1461,13 +1461,14 @@ function renderTestCaseForPrinting(&$db,&$node,&$options,$env,$context,$indentLe
}
$requirements = null;
// collect keywords for TC
if ($options['keyword'])
{
// collect keywords for TC VERSION
if ($options['keyword']) {
$code .= '<tr><td width="' . $cfg['firstColWidth'] . '" valign="top"><span class="label">'.
$labels['keywords'].':</span></td>';
$code .= '<td colspan="' . ($cfg['tableColspan']-1) . '">';
$kwSet = (array)$tc_mgr->getKeywords($id,null,array('fields' => 'keyword_id,keywords.keyword'));
// HERE WE NEED TO REFACTOR 20181222
$kwSet = (array)$tc_mgr->getKeywords($id,$tcversion_id,null,array('fields' => 'keyword_id,KW.keyword'));
if (sizeof($kwSet)) {
foreach ($kwSet as $kw) {
$code .= htmlspecialchars($kw['keyword']) . "<br />";
@@ -118,6 +118,8 @@
}
}
}
// var_dump($opx); die();
switch($doc_info->content_range) {
case 'testproject':
@@ -127,7 +129,7 @@
case 'testsuite':
$ctx->branchRoot = $args->itemID;
$opx = array_merge((array)$opx,$my['options']['prepareNode']);
$opx = array_merge((array)$opx,(array)$my['options']['prepareNode']);
list($treeForPlatform,$items2use) =
buildContentForTestPlanBranch($db,$subtree,$ctx,$doc_info,$decode,$tplan_mgr,$opx);
break;
@@ -289,6 +291,8 @@ function init_args(&$dbHandler) {
$args = new stdClass();
$pParams = R_PARAMS($iParams,$args);
//var_dump($_REQUEST); die();
// really UGLY HACK
$typeDomain = array('test_plan' => 'testplan','test_report' => 'testreport');
$args->type = isset($typeDomain[$args->type]) ? $typeDomain[$args->type] : $args->type;

0 comments on commit 4382b34

Please sign in to comment.