From abc7c483c25ebfad07ab425939de107c89966d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Wed, 1 Jun 2022 17:25:02 +0800 Subject: [PATCH 01/12] * Modify taskrecordestimate api. --- api/v1/entries/taskrecordestimate.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/v1/entries/taskrecordestimate.php b/api/v1/entries/taskrecordestimate.php index 9b0dae7740..0253760e64 100644 --- a/api/v1/entries/taskrecordestimate.php +++ b/api/v1/entries/taskrecordestimate.php @@ -20,7 +20,7 @@ class taskRecordEstimateEntry extends Entry */ public function get($taskID) { - if($this->config->edition != 'open') + if($this->loadModel('effort')) { $control = $this->loadController('effort', 'createForObject'); $control->createForObject('task', $taskID); @@ -36,8 +36,8 @@ class taskRecordEstimateEntry extends Entry if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); $effort = array(); - if($this->config->edition != 'open' and $data->data->efforts) $effort = $data->data->efforts; - if($this->config->edition == 'open' and $data->data->estimates) $effort = $data->data->estimates; + if($this->loadModel('effort') and $data->data->efforts) $effort = $data->data->efforts; + if($this->loadModel('effort') and $data->data->estimates) $effort = $data->data->estimates; $this->send(200, array('effort' => $effort)); } @@ -51,7 +51,7 @@ class taskRecordEstimateEntry extends Entry */ public function post($taskID) { - if($this->config->edition != 'open') + if($this->loadModel('effort')) { $fields = 'id,dates,consumed,left,objectType,objectID,work'; $this->batchSetPost($fields); From ff596bfd6744548b8f80754280a4d3a4e2c6cd99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Mon, 6 Jun 2022 10:17:02 +0800 Subject: [PATCH 02/12] * Fix bug. --- api/v1/entries/taskrecordestimate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1/entries/taskrecordestimate.php b/api/v1/entries/taskrecordestimate.php index 0253760e64..0f8acab651 100644 --- a/api/v1/entries/taskrecordestimate.php +++ b/api/v1/entries/taskrecordestimate.php @@ -36,8 +36,8 @@ class taskRecordEstimateEntry extends Entry if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); $effort = array(); - if($this->loadModel('effort') and $data->data->efforts) $effort = $data->data->efforts; - if($this->loadModel('effort') and $data->data->estimates) $effort = $data->data->estimates; + if($this->loadModel('effort') and $data->data->efforts) $effort = $data->data->efforts; + if(!$this->loadModel('effort') and $data->data->estimates) $effort = $data->data->estimates; $this->send(200, array('effort' => $effort)); } From d77300ebf8c847851e2c5ac5228ff6da7b251eea Mon Sep 17 00:00:00 2001 From: sunjun Date: Mon, 6 Jun 2022 03:56:27 +0000 Subject: [PATCH 03/12] fixbug_sunjun_23101 --- module/product/view/project.html.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/product/view/project.html.php b/module/product/view/project.html.php index ff9bed560a..200bffb3c7 100644 --- a/module/product/view/project.html.php +++ b/module/product/view/project.html.php @@ -30,7 +30,11 @@

+ systemMode == 'new'):?> project->empty;?> + + execution->noExecution;?> +

From 7b19aa7af83a6eeaf2f4b17df6d3202486f13428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Mon, 6 Jun 2022 14:29:21 +0800 Subject: [PATCH 04/12] * Modify. --- api/v1/entries/taskrecordestimate.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/v1/entries/taskrecordestimate.php b/api/v1/entries/taskrecordestimate.php index 0f8acab651..b6e87b068d 100644 --- a/api/v1/entries/taskrecordestimate.php +++ b/api/v1/entries/taskrecordestimate.php @@ -20,7 +20,8 @@ class taskRecordEstimateEntry extends Entry */ public function get($taskID) { - if($this->loadModel('effort')) + $issetEffort = $this->loadModel('effort') ? true : false; + if($issetEffort) { $control = $this->loadController('effort', 'createForObject'); $control->createForObject('task', $taskID); @@ -36,8 +37,8 @@ class taskRecordEstimateEntry extends Entry if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); $effort = array(); - if($this->loadModel('effort') and $data->data->efforts) $effort = $data->data->efforts; - if(!$this->loadModel('effort') and $data->data->estimates) $effort = $data->data->estimates; + if($issetEffort and $data->data->efforts) $effort = $data->data->efforts; + if(!$issetEffort and $data->data->estimates) $effort = $data->data->estimates; $this->send(200, array('effort' => $effort)); } From 9ff12274e2ad150e243074c108a70eadf6f0a465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Mon, 6 Jun 2022 15:00:09 +0800 Subject: [PATCH 05/12] * Fix bug #23291. --- module/execution/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/control.php b/module/execution/control.php index c2201ad0f1..e89d613e03 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -126,7 +126,7 @@ class execution extends control $execution = $this->commonAction($executionID, $status); $executionID = $execution->id; - if($execution->type == 'kanban' and $this->config->vision != 'lite' and defined('RUN_MODE') and RUN_MODE != 'api') $this->locate($this->createLink('execution', 'kanban', "executionID=$executionID")); + if($execution->type == 'kanban' and $this->config->vision != 'lite' and $this->app->getViewType() != 'json') $this->locate($this->createLink('execution', 'kanban', "executionID=$executionID")); /* Get products by execution. */ $products = $this->product->getProductPairsByProject($executionID); From 13f565ed69b6c0319fd2e209246915a115203c02 Mon Sep 17 00:00:00 2001 From: sunjun Date: Mon, 6 Jun 2022 08:14:04 +0000 Subject: [PATCH 06/12] fixbug_sunjun_22885 --- module/productplan/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/productplan/control.php b/module/productplan/control.php index cdf06aa625..91e1ca7c74 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -274,7 +274,7 @@ class productplan extends control } if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess)); - die(js::locate(inlink('browse', "productID=$plan->product"), 'parent')); + die(js::reload('parent')); } } From 36e609f808ca958004186d8923c13eb313299c02 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 6 Jun 2022 16:52:30 +0800 Subject: [PATCH 07/12] * Fix bug#23116. --- module/block/control.php | 3 ++- module/project/model.php | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index e8237a4b99..23bb4ac43e 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -896,7 +896,8 @@ class block extends control $count = isset($this->params->count) ? (int)$this->params->count : 15; /* Get projects. */ - $projects = $this->loadModel('project')->getOverviewList('byStatus', $status, 'id_desc', $count); + $excludedModel = $this->config->edition == 'max' ? '' : 'waterfall'; + $projects = $this->loadModel('project')->getOverviewList('byStatus', $status, 'id_desc', $count, $excludedModel); if(empty($projects)) { $this->view->projects = $projects; diff --git a/module/project/model.php b/module/project/model.php index b30f4ec843..e46187d781 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -273,16 +273,18 @@ class projectModel extends model * @param string|int $param * @param string $orderBy * @param int $limit + * @param string $excludedModel * @access public * @return array */ - public function getOverviewList($queryType = 'byStatus', $param = 'all', $orderBy = 'id_desc', $limit = 15) + public function getOverviewList($queryType = 'byStatus', $param = 'all', $orderBy = 'id_desc', $limit = 15, $excludedModel = '') { $queryType = strtolower($queryType); $projects = $this->dao->select('*')->from(TABLE_PROJECT) ->where('type')->eq('project') ->andWhere('vision')->eq($this->config->vision) ->andWhere('deleted')->eq(0) + ->beginIF($excludedModel)->andWhere('model')->ne($excludedModel)->fi() ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi() ->beginIF($queryType == 'bystatus' and $param == 'undone')->andWhere('status')->notIN('done,closed')->fi() ->beginIF($queryType == 'bystatus' and $param != 'all' and $param != 'undone')->andWhere('status')->eq($param)->fi() From 645d5230daea39d0f3f78f729903e8f5d50bad8e Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 6 Jun 2022 17:28:54 +0800 Subject: [PATCH 08/12] * Fix bug #23327. --- www/js/my.full.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/js/my.full.js b/www/js/my.full.js index 011203b28d..0fb903ca80 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -245,7 +245,7 @@ function setMailto(mailto, contactListID) { $('#' + mailto).replaceWith(users); $('#' + mailto + '_chosen').remove(); - $('.picker').remove(); + $('#' + mailto).siblings('.picker').remove(); if($("[data-pickertype='remote']").length == 0 && $('.picker-select').length == 0) { From d2242277e7ad3454ab57aa0a7b79af180f803b81 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 7 Jun 2022 08:57:24 +0800 Subject: [PATCH 09/12] * Fix bug #23335. --- module/execution/css/managemembers.css | 3 +++ module/execution/js/managemembers.js | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/module/execution/css/managemembers.css b/module/execution/css/managemembers.css index 9c4c327dc6..57b1ce469c 100644 --- a/module/execution/css/managemembers.css +++ b/module/execution/css/managemembers.css @@ -17,6 +17,9 @@ #execution_chosen .chosen-single {width: 230px;} #execution_chosen .chosen-drop ul li .label {margin-top: 2px; background: #fff; color: #838a9d; border: 1px solid #d8d8d8;} .radio-inline {line-height: normal;} +#dept + .picker{width: 220px;} +#execution + .picker{width: 230px;} +#mainMenu .picker-has-value {float: left;} #teamForm .table tr > td:first-child {padding-left: 10px;} #teamForm .table tr > td:last-child {padding-right: 10px;} diff --git a/module/execution/js/managemembers.js b/module/execution/js/managemembers.js index 8bc575a878..9ab61745af 100644 --- a/module/execution/js/managemembers.js +++ b/module/execution/js/managemembers.js @@ -1,10 +1,11 @@ $(function() { - $('#execution_chosen').click(function() + + $('#execution_chosen, #execution + .picker').click(function() { if(systemMode == 'new') { - $('#execution_chosen ul li').each(function(index) + $('#execution_chosen ul li, #pickerDropMenu-pk_execution div a').each(function(index) { if(index == 0) { From 020528cdbbb3c01d03eae04a54f013eb5db5298d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 7 Jun 2022 08:59:51 +0800 Subject: [PATCH 10/12] * Fix bug #23335. --- module/execution/css/managemembers.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/css/managemembers.css b/module/execution/css/managemembers.css index 57b1ce469c..5e0732d35a 100644 --- a/module/execution/css/managemembers.css +++ b/module/execution/css/managemembers.css @@ -17,8 +17,8 @@ #execution_chosen .chosen-single {width: 230px;} #execution_chosen .chosen-drop ul li .label {margin-top: 2px; background: #fff; color: #838a9d; border: 1px solid #d8d8d8;} .radio-inline {line-height: normal;} -#dept + .picker{width: 220px;} -#execution + .picker{width: 230px;} +#dept + .picker {width: 220px;} +#execution + .picker {width: 230px;} #mainMenu .picker-has-value {float: left;} #teamForm .table tr > td:first-child {padding-left: 10px;} From 61142f9f6707eafa301b05e87d0b0a92f3722dbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=8E=89=E6=98=A5?= <563917701@qq.com> Date: Tue, 7 Jun 2022 01:01:59 +0000 Subject: [PATCH 11/12] Update managemembers.js --- module/execution/js/managemembers.js | 1 - 1 file changed, 1 deletion(-) diff --git a/module/execution/js/managemembers.js b/module/execution/js/managemembers.js index 9ab61745af..2bf74db218 100644 --- a/module/execution/js/managemembers.js +++ b/module/execution/js/managemembers.js @@ -1,6 +1,5 @@ $(function() { - $('#execution_chosen, #execution + .picker').click(function() { if(systemMode == 'new') From 3033d3e5678921b4063b1f5718259d38d7225054 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 7 Jun 2022 09:42:05 +0800 Subject: [PATCH 12/12] * Fix bug #23258. --- module/company/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/company/config.php b/module/company/config.php index 475e57d824..3b1ab78b81 100644 --- a/module/company/config.php +++ b/module/company/config.php @@ -11,7 +11,7 @@ $config->company->dynamic->search['module'] = 'action'; if($config->vision == 'rnd') $config->company->dynamic->search['fields']['product'] = $lang->action->product; -$config->company->dynamic->search['fields']['project'] = '项目'; +if($config->systemMode == 'new') $config->company->dynamic->search['fields']['project'] = '项目'; $config->company->dynamic->search['fields']['execution'] = $lang->action->execution; $config->company->dynamic->search['fields']['actor'] = $lang->action->actor; $config->company->dynamic->search['fields']['objectID'] = $lang->action->objectID;