From 640dd2ce1b4fd038466a1c8c28ba798fda8c99e2 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Fri, 21 Jan 2022 13:10:45 +0800 Subject: [PATCH 1/4] * Delete product for dynamic search. --- module/company/config.php | 7 +++++-- module/company/control.php | 2 +- module/company/view/dynamic.html.php | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/module/company/config.php b/module/company/config.php index 7b6de8a08f..7ff4a97de4 100644 --- a/module/company/config.php +++ b/module/company/config.php @@ -8,7 +8,9 @@ $app->loadLang('action'); $app->loadLang('user'); $config->company->dynamic = new stdclass(); $config->company->dynamic->search['module'] = 'action'; -$config->company->dynamic->search['fields']['product'] = $lang->action->product; + +if($config->vision == 'rnd') $config->company->dynamic->search['fields']['product'] = $lang->action->product; + $config->company->dynamic->search['fields']['project'] = '项目'; $config->company->dynamic->search['fields']['execution'] = $lang->action->execution; $config->company->dynamic->search['fields']['actor'] = $lang->action->actor; @@ -17,7 +19,8 @@ $config->company->dynamic->search['fields']['objectType'] = $lang->action->objec $config->company->dynamic->search['fields']['date'] = $lang->action->date; $config->company->dynamic->search['fields']['action'] = $lang->action->action; -$config->company->dynamic->search['params']['product'] = array('operator' => '=', 'control' => 'select', 'values' => ''); +if($config->vision == 'rnd') $config->company->dynamic->search['params']['product'] = array('operator' => '=', 'control' => 'select', 'values' => ''); + $config->company->dynamic->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => ''); $config->company->dynamic->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => ''); $config->company->dynamic->search['params']['actor'] = array('operator' => '=', 'control' => 'select', 'values' => ''); diff --git a/module/company/control.php b/module/company/control.php index bf7abca473..a840fd8b81 100644 --- a/module/company/control.php +++ b/module/company/control.php @@ -271,7 +271,7 @@ class company extends control $this->config->company->dynamic->search['actionURL'] = $this->createLink('company', 'dynamic', "browseType=bysearch¶m=myQueryID"); $this->config->company->dynamic->search['queryID'] = $queryID; $this->config->company->dynamic->search['params']['action']['values'] = $this->lang->action->search->label; - $this->config->company->dynamic->search['params']['product']['values'] = $products; + if($this->config->vision == 'rnd') $this->config->company->dynamic->search['params']['product']['values'] = $products; $this->config->company->dynamic->search['params']['project']['values'] = $projects; $this->config->company->dynamic->search['params']['execution']['values'] = $executions; $this->config->company->dynamic->search['params']['actor']['values'] = $accountPairs; diff --git a/module/company/view/dynamic.html.php b/module/company/view/dynamic.html.php index ab820eed0b..32a9bd89a6 100644 --- a/module/company/view/dynamic.html.php +++ b/module/company/view/dynamic.html.php @@ -28,7 +28,9 @@ ?>
+ config->vision == 'rnd'):?>
+ systemMode == 'new'):?>
From 877cc194e928161e7a45c5e08dbcf1450281159d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Fri, 21 Jan 2022 13:32:50 +0800 Subject: [PATCH 2/4] * fix bug for #18630. --- extension/lite/tree/ext/lang/zh-cn/lite.php | 1 + module/product/model.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/extension/lite/tree/ext/lang/zh-cn/lite.php b/extension/lite/tree/ext/lang/zh-cn/lite.php index 05adc8f226..858f831cdd 100644 --- a/extension/lite/tree/ext/lang/zh-cn/lite.php +++ b/extension/lite/tree/ext/lang/zh-cn/lite.php @@ -12,3 +12,4 @@ if($app->rawModule == 'tree' and $app->rawMethod == 'browse') $lang->tree->name = '目录名称'; $lang->tree->syncFromProduct = '复制目录'; } +if($app->rawModule == 'story') $lang->tree->manage = $lang->tree->manageMenu; diff --git a/module/product/model.php b/module/product/model.php index 63fbf8a7f4..3d2aa99eac 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -253,6 +253,7 @@ class productModel extends model ->beginIF($programID)->andWhere('t1.program')->eq($programID)->fi() ->beginIF($line > 0)->andWhere('t1.line')->eq($line)->fi() ->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->products)->fi() + ->andWhere('t1.vision')->eq($this->config->vision)->fi() ->beginIF($status == 'noclosed')->andWhere('t1.status')->ne('closed')->fi() ->beginIF($status != 'all' and $status != 'noclosed' and $status != 'involved')->andWhere('t1.status')->in($status)->fi() ->beginIF($status == 'involved') @@ -285,7 +286,8 @@ class productModel extends model ->beginIF(strpos($mode, 'all') === false)->andWhere('deleted')->eq(0)->fi() ->beginIF($programID)->andWhere('program')->eq($programID)->fi() ->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi() - ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)->fi() + ->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('id')->in($this->app->user->view->products)->fi() + ->andWhere('vision')->eq($this->config->vision) ->orderBy($orderBy) ->fetchPairs('id', 'name'); return $products; @@ -325,6 +327,7 @@ class productModel extends model ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id') ->where('t3.deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('t3.id')->in($this->app->user->view->products)->fi() + ->andWhere('t3.vision')->eq($this->config->vision)->fi() ->beginIF($model != 'all')->andWhere('t2.model')->eq($model) ->fetchPairs('id', 'name'); } @@ -353,7 +356,8 @@ class productModel extends model ->on('t1.product = t2.id') ->where('t2.deleted')->eq(0) ->beginIF(!empty($projectID))->andWhere('t1.project')->eq($projectID)->fi() - ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->products)->fi() + ->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('t2.id')->in($this->app->user->view->products)->fi() + ->andWhere('t2.vision')->eq($this->config->vision) ->beginIF(strpos($status, 'noclosed') !== false)->andWhere('t2.status')->ne('closed')->fi() ->orderBy($orderBy . 't2.order asc') ->fetchAll('id'); From 63a226f509e421f974f474a1039e67de22ce1061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Fri, 21 Jan 2022 13:40:12 +0800 Subject: [PATCH 3/4] * fix bug #18622. --- extension/lite/project/ext/view/batchedit.lite.html.hook.php | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 extension/lite/project/ext/view/batchedit.lite.html.hook.php diff --git a/extension/lite/project/ext/view/batchedit.lite.html.hook.php b/extension/lite/project/ext/view/batchedit.lite.html.hook.php new file mode 100644 index 0000000000..ab63b1d104 --- /dev/null +++ b/extension/lite/project/ext/view/batchedit.lite.html.hook.php @@ -0,0 +1,4 @@ + From 2575840b24c59b4648424394ac78a91c73e86077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Fri, 21 Jan 2022 14:31:07 +0800 Subject: [PATCH 4/4] * fix bug #18608. --- extension/lite/project/ext/lang/zh-cn/lite.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extension/lite/project/ext/lang/zh-cn/lite.php b/extension/lite/project/ext/lang/zh-cn/lite.php index 084dcb54d9..c8639023a6 100644 --- a/extension/lite/project/ext/lang/zh-cn/lite.php +++ b/extension/lite/project/ext/lang/zh-cn/lite.php @@ -1,2 +1,4 @@ project->leftStories = '剩余目标'; + +$lang->project->aclList['private'] = "私有 (只有项目负责人、团队成员可访问)";