* Finish task #36025.
This commit is contained in:
@@ -1403,7 +1403,6 @@ class story extends control
|
||||
$this->session->set('bugList', $this->app->getURI(true));
|
||||
$this->session->set('revisionList', $this->app->getURI(true));
|
||||
|
||||
|
||||
/* Load pager and get tracks. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
+30
-13
@@ -3644,19 +3644,30 @@ class storyModel extends model
|
||||
$stories = empty($stories) ? array() : $stories;
|
||||
foreach($stories as $id => $title)
|
||||
{
|
||||
$stories[$id] = new stdclass();
|
||||
$stories[$id]->title = $title;
|
||||
$stories[$id]->case = $this->loadModel('testcase')->getStoryCases($id);
|
||||
$stories[$id]->bug = $this->loadModel('bug')->getStoryBugs($id);
|
||||
$stories[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
|
||||
$stories[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($stories[$id]->design))->fetchPairs();
|
||||
$stories[$id] = new stdclass();
|
||||
$stories[$id]->title = $title;
|
||||
$stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
|
||||
$stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
|
||||
$stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id);
|
||||
$stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
|
||||
$stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION)
|
||||
->where('AType')->eq('design')
|
||||
->andWhere('BType')->eq('commit')
|
||||
->andWhere('AID')->in(array_keys($stories[$id]->designs))
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
$requirement->track = $stories;
|
||||
}
|
||||
|
||||
/* Get no requirements story. */
|
||||
$subdividedStories = $this->dao->select('BID')->from(TABLE_RELATION)->where('AType')->eq('requirement')->andWhere('BType')->eq('story')->andWhere('relation')->eq('subdivideinto')->andWhere('product')->eq($productID)->fetchPairs('BID', 'BID');
|
||||
$subdividedStories = $this->dao->select('BID')->from(TABLE_RELATION)
|
||||
->where('AType')->eq('requirement')
|
||||
->andWhere('BType')->eq('story')
|
||||
->andWhere('relation')->eq('subdivideinto')
|
||||
->andWhere('product')->eq($productID)
|
||||
->fetchPairs('BID', 'BID');
|
||||
|
||||
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $subdividedStories);
|
||||
if($stories) $pager->recTotal += 1;
|
||||
|
||||
@@ -3664,13 +3675,19 @@ class storyModel extends model
|
||||
{
|
||||
foreach($stories as $id => $story)
|
||||
{
|
||||
$stories[$id] = new stdclass();
|
||||
$stories[$id]->title = $story->title;
|
||||
$stories[$id]->case = $this->loadModel('testcase')->getStoryCases($id);
|
||||
$stories[$id]->bug = $this->loadModel('bug')->getStoryBugs($id);
|
||||
$stories[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
|
||||
$stories[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($stories[$id]->design))->fetchPairs();
|
||||
$stories[$id] = new stdclass();
|
||||
$stories[$id]->title = $story->title;
|
||||
$stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
|
||||
$stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
|
||||
$stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id);
|
||||
$stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
|
||||
$stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION)
|
||||
->where('AType')->eq('design')
|
||||
->andWhere('BType')->eq('commit')
|
||||
->andWhere('AID')->in(array_keys($stories[$id]->designs))
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
$requirements['noRequirement'] = $stories;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<?php endif;?>
|
||||
</th>
|
||||
<th><?php echo $lang->story->story;?></th>
|
||||
<th><?php echo $lang->story->tasks;?></th>
|
||||
<th><?php echo $lang->story->design;?></th>
|
||||
<th><?php echo $lang->story->case;?></th>
|
||||
<th><?php echo $lang->story->repoCommit;?></th>
|
||||
@@ -61,24 +62,29 @@
|
||||
<?php if($i != 1) echo '<tr>';?>
|
||||
<td style='padding-left: 10px;'><?php echo html::a($this->createLink($module, 'view', "storyID=$storyID"), $story->title, '',"title='$story->title' data-group='$openModel'");?></td>
|
||||
<td>
|
||||
<?php foreach($story->design as $designID => $design):?>
|
||||
<?php foreach($story->tasks as $taskID => $task):?>
|
||||
<?php echo html::a($this->createLink('task', 'view', "taskID=$taskID"), $task->name, '', "title='$task->name'") . '<br/>';?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<td>
|
||||
<?php foreach($story->designs as $designID => $design):?>
|
||||
<?php echo html::a($this->createLink('design', 'view', "designID=$designID"), $design->name, '', "title='$design->name'") . '<br/>';?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<td>
|
||||
<?php foreach($story->case as $caseID => $case):?>
|
||||
<?php foreach($story->cases as $caseID => $case):?>
|
||||
<?php echo html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', false, $case->PRJ), $case->title, '', "title='$case->title'") . '<br/>';?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<td>
|
||||
<?php foreach($story->revision as $revision => $repoID):?>
|
||||
<?php foreach($story->revisions as $revision => $repoID):?>
|
||||
<?php
|
||||
echo html::a($this->createLink('design', 'revision', "repoID=$revision"), '#'. $revision) . '<br/>';
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<td>
|
||||
<?php foreach($story->bug as $bugID => $bug):?>
|
||||
<?php foreach($story->bugs as $bugID => $bug):?>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bugID"), $bug->title, '', "title='$bug->title'") . '<br/>';?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user