* code for task #71601.

This commit is contained in:
wangyidong
2022-10-09 09:04:06 +08:00
parent 91b8e84e13
commit e3658d178f
5 changed files with 25 additions and 3 deletions
+21 -3
View File
@@ -856,14 +856,32 @@ class block extends control
$productIdList = array();
foreach($productStats as $product) $productIdList[] = $product->id;
$this->view->executions = $this->dao->select('t1.product,t2.name')->from(TABLE_PROJECTPRODUCT)->alias('t1')
$this->app->loadLang('project');
$executions = $this->dao->select('t1.product,t2.id,t2.project,t2.name,t2.multiple')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
->where('t1.product')->in($productIdList)
->andWhere('t2.type')->in('stage,sprint')
->andWhere('t2.multiple')->eq('1')
->andWhere('t2.deleted')->eq(0)
->orderBy('t1.project')
->fetchPairs('product', 'name');
->fetchAll('product');
$executionPairs = array();
$noMultiples = array();
foreach($executions as $execution)
{
if(empty($execution->multiple)) $noMultiples[$execution->product] = $execution->project;
$executionPairs[$execution->product] = $execution->name;
}
if($noMultiples)
{
$noMultipleProjects = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($noMultiples)->fetchPairs('id', 'name');
foreach($noMultiples as $productID => $projectID)
{
if(isset($noMultipleProjects[$projectID])) $executionPairs[$productID] = $noMultipleProjects[$projectID] . "({$this->lang->project->noMultiple})";
}
}
$this->view->executions = $executionPairs;
$this->view->productStats = $productStats;
}
+1
View File
@@ -64,6 +64,7 @@ $lang->project->budgetNumber = '『Budget』must be numbers.';
$lang->project->budgetGe0 = '『Budget』must be greater than or equal to 0.';
$lang->project->allProjects = 'All Projects';
$lang->project->ignore = 'Ignore';
$lang->project->noMultiple = 'Project of disable iteration';
/* Fields. */
$lang->project->common = 'Project';
+1
View File
@@ -64,6 +64,7 @@ $lang->project->budgetNumber = '『Budget』must be numbers.';
$lang->project->budgetGe0 = '『Budget』must be greater than or equal to 0.';
$lang->project->allProjects = 'All Projects';
$lang->project->ignore = 'Ignore';
$lang->project->noMultiple = 'Project of disable iteration';
/* Fields. */
$lang->project->common = 'Project';
+1
View File
@@ -64,6 +64,7 @@ $lang->project->budgetNumber = '『Budget』must be numbers.';
$lang->project->budgetGe0 = '『Budget』must be greater than or equal to 0.';
$lang->project->allProjects = 'All Projects';
$lang->project->ignore = 'Ignorer';
$lang->project->noMultiple = 'Project of disable iteration';
/* Fields. */
$lang->project->common = 'Projets';
+1
View File
@@ -64,6 +64,7 @@ $lang->project->budgetNumber = '『预算』金额必须为数字。';
$lang->project->budgetGe0 = '『预算』金额必须大于等于0。';
$lang->project->allProjects = '所有项目';
$lang->project->ignore = '忽略';
$lang->project->noMultiple = '不启用迭代的项目';
/* Fields. */
$lang->project->common = '项目';