* Change the type of the argument to call getByList.

This commit is contained in:
tianshujie
2023-09-28 09:14:48 +08:00
parent 7646fdc770
commit 841423ecb2
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ class build extends control
$this->view->link = $link;
$this->view->orderBy = $orderBy;
$this->view->execution = $this->loadModel('execution')->getByID($build->execution);
$this->view->childBuilds = empty($build->builds) ? array() : $this->dao->select('id,name,bugs,stories')->from(TABLE_BUILD)->where('id')->in($build->builds)->fetchAll();
$this->view->childBuilds = empty($build->builds) ? array() : $this->build->getByList(explode(',', $build->builds));
$this->display();
}
+2 -2
View File
@@ -82,7 +82,7 @@ class buildModel extends model
$executionIdList = array();
foreach($builds as $build)
{
$build->builds = $this->build->getByList($build->builds);
$build->builds = $this->build->getByList(explode(',', $build->builds));
if(!empty($build->builds))
{
foreach($build->builds as $child)
@@ -225,7 +225,7 @@ class buildModel extends model
{
if(!$build->execution && !empty($build->builds))
{
$childBuilds = $this->getByList($build->builds);
$childBuilds = $this->getByList(explode(',', $build->builds));
foreach($childBuilds as $childBuild)
{
$childBuild->stories = trim($childBuild->stories, ',');
+1 -1
View File
@@ -183,7 +183,7 @@ class projectrelease extends control
/* Get the builds that can select. */
$builds = $this->loadModel('build')->getBuildPairs(array($release->product), $release->branch, 'notrunk|withbranch|hasproject', $this->session->project, 'project', $release->build, false);
$bindBuilds = $this->build->getByList($release->build);
$bindBuilds = $this->build->getByList(explode(',', $release->build));
$releasedBuilds = $this->projectrelease->getReleasedBuilds($this->session->project);
foreach($releasedBuilds as $releasedBuild)
{
+2 -2
View File
@@ -545,7 +545,7 @@ class release extends control
}
$this->loadModel('search')->setSearchParams($this->config->product->search);
$builds = $this->loadModel('build')->getByList($release->build);
$builds = $this->loadModel('build')->getByList(explode(',', $release->build));
$executionIdList = array();
foreach($builds as $build)
{
@@ -674,7 +674,7 @@ class release extends control
}
$this->loadModel('search')->setSearchParams($this->config->bug->search);
$builds = $this->loadModel('build')->getByList($release->build);
$builds = $this->loadModel('build')->getByList(explode(',', $release->build));
$allBugs = array();
$releaseBugs = $type == 'bug' ? $release->bugs : $release->leftBugs;
if($browseType == 'bySearch')
+2 -2
View File
@@ -248,7 +248,7 @@ class testreportZen extends testreport
foreach($tasks as $task) $this->setChartDatas($task->id);
$execution = $this->execution->getById($report->execution);
$builds = $this->build->getByList($report->builds);
$builds = $this->build->getByList(explode(',', $report->builds));
$stories = !empty($builds) ? $this->testreport->getStories4Test($builds) : $this->story->getExecutionStories($report->execution);
$bugs = $this->testreport->getBugs4Test($builds, $productIdList, $begin, $end, 'execution');
@@ -329,7 +329,7 @@ class testreportZen extends testreport
$reportData['execution'] = $this->execution->getById($report->execution);
$reportData['stories'] = $report->stories ? $this->story->getByList($report->stories) : array();
$reportData['tasks'] = $report->tasks ? $this->testtask->getByList(explode(',', $report->tasks)) : array();
$reportData['builds'] = $report->builds ? $this->build->getByList($report->builds) : array();
$reportData['builds'] = $report->builds ? $this->build->getByList(explode(',', $report->builds)) : array();
$reportData['bugs'] = $report->bugs ? $this->bug->getByIdList($report->bugs) : array();
$reportData['report'] = $report;
return $reportData;