From 1d1d64f6009b4ceb1fbde6a3f6e169c209b5a4f2 Mon Sep 17 00:00:00 2001 From: Yagami Date: Fri, 22 Feb 2019 13:20:24 +0800 Subject: [PATCH] * Finish task #5296. --- module/bug/model.php | 1 + module/story/model.php | 1 + module/task/model.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/module/bug/model.php b/module/bug/model.php index facb21345d..f7721b011c 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1325,6 +1325,7 @@ class bugModel extends model $bugs = $this->dao->select('*')->from(TABLE_BUG) ->where('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() + ->beginIF($type != 'closedBy')->andWhere('status')->ne('closed')->fi() ->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi() ->orderBy($orderBy) ->beginIF($limit > 0)->limit($limit)->fi() diff --git a/module/story/model.php b/module/story/model.php index 6921f834ed..0d4a51d22c 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1771,6 +1771,7 @@ class storyModel extends model $stories = $this->dao->select('t1.*, t2.name as productTitle')->from(TABLE_STORY)->alias('t1') ->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id') ->where('t1.deleted')->eq(0) + ->beginIF($type != 'closedBy')->andWhere('t1.status')->ne('closed')->fi() ->beginIF($type != 'all') ->beginIF($type == 'assignedTo')->andWhere('assignedTo')->eq($account)->fi() ->beginIF($type == 'openedBy')->andWhere('openedBy')->eq($account)->fi() diff --git a/module/task/model.php b/module/task/model.php index 9c5bb36250..45f9029dba 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1671,7 +1671,7 @@ class taskModel extends model ->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->leftjoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id') ->where('t1.deleted')->eq(0) - ->beginIF($type == 'assignedTo')->andWhere('t1.status')->ne('closed')->fi() + ->beginIF($type != 'closedBy')->andWhere('t1.status')->ne('closed')->fi() ->beginIF($type == 'finishedBy') ->andWhere('t1.finishedby', 1)->eq($account) ->orWhere('t1.finishedList')->like("%,{$account},%")