Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2015-11-13 10:56:47 +08:00
7 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -122,7 +122,7 @@ class bug extends control
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productID);
$this->config->bug->search['params']['module']['values'] = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
if($this->session->currentProductType == 'normal')
{
@@ -141,7 +141,7 @@ class bug extends control
/* Process the openedBuild and resolvedBuild fields. */
$productIdList = array();
foreach($bugs as $bug) $productIdList[$bug->id] = $bug->product;
$builds = $this->loadModel('build')->getProductBuildPairs(array_unique($productIdList));
$builds = $this->loadModel('build')->getProductBuildPairs(array_unique($productIdList), $branch = 0, $params = '');
foreach($bugs as $key => $bug)
{
$openBuildIdList = explode(',', $bug->openedBuild);
@@ -487,7 +487,7 @@ class bug extends control
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : $this->loadModel('branch')->getById($bug->branch);
$this->view->users = $this->user->getPairs('noletter');
$this->view->actions = $this->action->getList('bug', $bugID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('bug', $bugID);
$this->display();
+1 -1
View File
@@ -1048,7 +1048,7 @@ class bugModel extends model
{
$datas = $this->dao->select('openedBuild as name, count(openedBuild) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('openedBuild')->orderBy('value DESC')->fetchAll('name');
if(!$datas) return array();
$builds = $this->loadModel('build')->getProductBuildPairs($this->session->product);
$builds = $this->loadModel('build')->getProductBuildPairs($this->session->product, $branch = 0, $params = '');
/* Deal with the situation that a bug maybe associate more than one openedBuild. */
foreach($datas as $buildIDList => $data)
+1 -1
View File
@@ -384,7 +384,7 @@ class build extends control
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($build->product => $build->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($build->product, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->loadModel('product')->getProjectPairs($build->product);
$this->config->bug->search['params']['openedBuild']['values'] = $this->build->getProductBuildPairs($build->product);
$this->config->bug->search['params']['openedBuild']['values'] = $this->build->getProductBuildPairs($build->product, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
unset($this->config->bug->search['fields']['branch']);
unset($this->config->bug->search['params']['branch']);
+1 -1
View File
@@ -107,7 +107,7 @@ class buildModel extends model
* @access public
* @return string
*/
public function getProductBuildPairs($products, $branch = 0, $params = '', $replace = true)
public function getProductBuildPairs($products, $branch = 0, $params = 'noterminate, nodone', $replace = true)
{
$sysBuilds = array();
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
+2 -2
View File
@@ -395,8 +395,8 @@ class productplan extends control
$this->config->bug->search['params']['plan']['values'] = $this->productplan->getForProducts(array($plan->product => $plan->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID);
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getProductBuildPairs($productID);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->loadModel('search')->setSearchParams($this->config->bug->search);
if($browseType == 'bySearch')
+1 -1
View File
@@ -444,7 +444,7 @@ class release extends control
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->loadModel('product')->getProjectPairs($release->product);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
unset($this->config->bug->search['fields']['branch']);
unset($this->config->bug->search['params']['branch']);
+2 -2
View File
@@ -418,7 +418,7 @@ class testtask extends control
$this->view->task = $task;
$this->view->projects = $this->product->getProjectPairs($productID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, $params = '');
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $task->owner);
$this->display();
@@ -818,7 +818,7 @@ class testtask extends control
$this->view->case = $case;
$this->view->results = $results;
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($case->product);
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($case->product, $branch = 0, $params = '');
$this->view->users = $this->loadModel('user')->getPairs('noclosed, noletter');
die($this->display());