From 586d4dcce0a4be205de30c2972002ab858874bb5 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Mon, 28 Apr 2025 04:06:53 +0000 Subject: [PATCH] * [task#142093,done,1h] add execution deliverable col. --- module/execution/config/dtable.php | 11 +++++++++++ module/execution/control.php | 1 + module/execution/model.php | 4 +++- module/project/config/dtable.php | 11 +++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/module/execution/config/dtable.php b/module/execution/config/dtable.php index 0fe823bf71..50081ab515 100644 --- a/module/execution/config/dtable.php +++ b/module/execution/config/dtable.php @@ -49,6 +49,17 @@ $config->execution->dtable->fieldList['status']['width'] = '80'; $config->execution->dtable->fieldList['status']['group'] = '1'; $config->execution->dtable->fieldList['status']['show'] = true; +if(in_array($config->edition, array('max', 'ipd'))) +{ + $config->execution->dtable->fieldList['deliverable']['title'] = $lang->execution->deliverableAbbr; + $config->execution->dtable->fieldList['deliverable']['name'] = 'deliverable'; + $config->execution->dtable->fieldList['deliverable']['type'] = 'html'; + $config->execution->dtable->fieldList['deliverable']['width'] = '100px'; + $config->execution->dtable->fieldList['deliverable']['group'] = '1'; + $config->execution->dtable->fieldList['deliverable']['show'] = true; + $config->execution->dtable->fieldList['deliverable']['sortType'] = false; +} + $config->execution->dtable->fieldList['PM']['title'] = $lang->execution->execPM; $config->execution->dtable->fieldList['PM']['name'] = 'PM'; $config->execution->dtable->fieldList['PM']['type'] = 'avatarBtn'; diff --git a/module/execution/control.php b/module/execution/control.php index 4f24b646b7..6b9ea64d8e 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2873,6 +2873,7 @@ class execution extends control $this->app->loadLang('stage'); $this->app->loadLang('programplan'); $this->loadModel('product'); + $this->loadModel('project'); $this->loadModel('datatable'); $from = $this->app->tab; diff --git a/module/execution/model.php b/module/execution/model.php index 71e79c08ed..3d80aeb774 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1431,7 +1431,7 @@ class executionModel extends model $executionQuery = $browseType == 'bySearch' ? $this->getExecutionQuery($param) : ''; $projectModel = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model'); - return $this->dao->select('t1.*,t2.name projectName, t2.model as projectModel')->from(TABLE_EXECUTION)->alias('t1') + return $this->dao->select('t1.*,t1.deliverable,t2.name projectName, t2.model as projectModel')->from(TABLE_EXECUTION)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->beginIF($productID)->leftJoin(TABLE_PROJECTPRODUCT)->alias('t3')->on('t1.id=t3.project')->fi() ->where('t1.type')->in('sprint,stage,kanban') @@ -4808,6 +4808,8 @@ class executionModel extends model $execution->PMAvatar = zget($avatarList, $execution->PMAccount, ''); } + if(in_array($this->config->edition, array('max', 'ipd'))) $execution->deliverable = $this->project->countDeliverable($execution, 'execution'); + $rows[$execution->id] = $execution; /* Append tasks and child stages. */ diff --git a/module/project/config/dtable.php b/module/project/config/dtable.php index 54b84a8340..41477b9827 100755 --- a/module/project/config/dtable.php +++ b/module/project/config/dtable.php @@ -200,6 +200,17 @@ $config->project->execution->dtable->fieldList['status']['width'] = '80'; $config->project->execution->dtable->fieldList['status']['group'] = '1'; $config->project->execution->dtable->fieldList['status']['show'] = true; +if(in_array($config->edition, array('max', 'ipd'))) +{ + $config->project->execution->dtable->fieldList['deliverable']['title'] = $lang->project->deliverableAbbr; + $config->project->execution->dtable->fieldList['deliverable']['name'] = 'deliverable'; + $config->project->execution->dtable->fieldList['deliverable']['type'] = 'html'; + $config->project->execution->dtable->fieldList['deliverable']['width'] = '100px'; + $config->project->execution->dtable->fieldList['deliverable']['group'] = '1'; + $config->project->execution->dtable->fieldList['deliverable']['show'] = true; + $config->project->execution->dtable->fieldList['deliverable']['sortType'] = false; +} + $config->project->execution->dtable->fieldList['PM']['title'] = $lang->project->PM; $config->project->execution->dtable->fieldList['PM']['name'] = 'PM'; $config->project->execution->dtable->fieldList['PM']['type'] = 'avatarBtn';