* adjust for testStory.
This commit is contained in:
@@ -82,6 +82,19 @@ class storyModel extends model
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get test stories.
|
||||
*
|
||||
* @param array $storyIdList
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTestStories($storyIdList, $projectID)
|
||||
{
|
||||
return $this->dao->select('story')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('type')->eq('test')->andWhere('story')->in($storyIdList)->fetchPairs('story', 'story');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get story specs.
|
||||
*
|
||||
|
||||
@@ -172,9 +172,6 @@ class task extends control
|
||||
$members = $this->project->getTeamMemberPairs($projectID, 'nodeleted');
|
||||
$moduleOptionMenu = $this->tree->getTaskOptionMenu($projectID);
|
||||
|
||||
/* Get no test stories. */
|
||||
$testStoryIdList = $this->dao->select('story')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('story')->in(array_keys($stories))->fetchPairs('story', 'story');
|
||||
|
||||
$title = $project->name . $this->lang->colon . $this->lang->task->create;
|
||||
$position[] = html::a($taskLink, $project->name);
|
||||
$position[] = $this->lang->task->common;
|
||||
@@ -194,7 +191,7 @@ class task extends control
|
||||
$this->view->task = $task;
|
||||
$this->view->users = $users;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->testStoryIdList = $testStoryIdList;
|
||||
$this->view->testStoryIdList = $this->loadModel('story')->getTestStories(array_keys($stories), $project->id);
|
||||
$this->view->members = $members;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->display();
|
||||
|
||||
@@ -438,6 +438,7 @@ class testtaskModel extends model
|
||||
*/
|
||||
public function getLinkableCasesBySuite($productID, $task, $query, $suite, $linkedCases, $pager)
|
||||
{
|
||||
if(strpos($query, '`product`') !== false) $query = str_replace('`product`', 't1.`product`', $query);
|
||||
return $this->dao->select('t1.*,t2.version as version')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_SUITECASE)->alias('t2')->on('t1.id=t2.case')
|
||||
->where($query)
|
||||
|
||||
Reference in New Issue
Block a user