From 9748e70a3161545a30f9a2f5012b25653063f164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Thu, 10 Feb 2022 09:37:34 +0800 Subject: [PATCH] * Fix bug #19356. --- module/execution/lang/en.php | 2 +- module/execution/lang/zh-cn.php | 2 +- module/execution/model.php | 8 +------- module/story/model.php | 1 + 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 3f3905ff27..a7de4f68fc 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -97,7 +97,7 @@ $lang->execution->burnYUnit = '(Hours)'; $lang->execution->waitTasks = 'Waiting Tasks'; $lang->execution->viewByUser = 'By User'; $lang->execution->oneProduct = "Only one stage can be linked {$lang->productCommon}"; -$lang->execution->noLinkProduct = "Stage not linked {$lang->productCommon}"; +$lang->execution->noLinkProduct = "Not linked {$lang->productCommon}!"; $lang->execution->recent = 'Recent visits: '; $lang->execution->copyNoExecution = 'There are no ' . $lang->executionCommon . 'available to copy.'; $lang->execution->noTeam = 'No team members at the moment'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 148047ed53..29bad65648 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -97,7 +97,7 @@ $lang->execution->burnYUnit = '(工时)'; $lang->execution->waitTasks = '待处理'; $lang->execution->viewByUser = '按用户查看'; $lang->execution->oneProduct = "阶段只能关联一个{$lang->productCommon}"; -$lang->execution->noLinkProduct = "阶段没有关联{$lang->productCommon}"; +$lang->execution->noLinkProduct = "关联{$lang->productCommon}不能为空!"; $lang->execution->recent = '近期访问:'; $lang->execution->copyNoExecution = '没有可用的' . $lang->executionCommon . '来复制'; $lang->execution->noTeam = '暂时没有团队成员'; diff --git a/module/execution/model.php b/module/execution/model.php index 9ca59927f6..5ca8a7feb6 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -303,18 +303,12 @@ class executionModel extends model /* If the execution model is a stage, determine whether the product is linked. */ $products = array_filter($this->post->products); - if($type == 'stage' and empty($products)) + if(empty($products)) { dao::$errors['message'][] = $this->lang->execution->noLinkProduct; return false; } - if($type == 'kanban' and empty($products)) - { - dao::$errors['message'][] = $this->lang->execution->kanbanNoLinkProduct; - return false; - } - $this->config->execution->create->requiredFields .= ',project'; } diff --git a/module/story/model.php b/module/story/model.php index 9ca2b9d80c..05b352d38c 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2923,6 +2923,7 @@ class storyModel extends model ->where('deleted')->eq(0) ->andWhere('type')->eq($type) ->andWhere('assignedTo')->eq($account) + ->andWhere('product')->ne(0) ->beginIF(!empty($skipProductIDList))->andWhere('product')->notin($skipProductIDList)->fi() ->orderBy('id_desc') ->limit($limit)