* Fix bug #35136, search linked story is empty in testsuit.
This commit is contained in:
@@ -816,6 +816,23 @@ class testcaseModel extends model
|
||||
return $caseCounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get case stories by productID.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStoriesByProduct($productID)
|
||||
{
|
||||
return $this->dao->select('t1.story, t2.title')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->andWhere('t1.story')->ne(0)
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a case.
|
||||
*
|
||||
|
||||
@@ -338,7 +338,8 @@ class testsuite extends control
|
||||
$this->loadModel('testcase');
|
||||
$this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case', 0, 'all');
|
||||
$this->config->testcase->search['params']['lib']['values'] = $this->loadModel('caselib')->getLibraries();
|
||||
|
||||
$this->config->testcase->search['params']['story']['values'] = array('' => '') + $this->loadModel('testcase')->getStoriesByProduct($productID);
|
||||
|
||||
$this->config->testcase->search['module'] = 'testsuite';
|
||||
$this->config->testcase->search['actionURL'] = inlink('linkCase', "suiteID=$suiteID¶m=myQueryID");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user