diff --git a/module/block/model.php b/module/block/model.php index 3b325a8c50..2b2b1aa0d8 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -176,8 +176,7 @@ class blockModel extends model ->fetch('count'); $data['stories'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count'); $data['projects'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT) - ->where('status')->ne('done') - ->andWhere('status')->ne('closed') + ->where('status')->notIN('done,closed') ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi() ->andWhere('deleted')->eq(0) ->fetch('count'); diff --git a/module/project/model.php b/module/project/model.php index 14702e843a..1acb35bddf 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -724,7 +724,7 @@ class projectModel extends model ->where('t1.product')->eq($productID) ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.iscat')->eq(0) - ->beginIF($status == 'undone')->andWhere('t2.status')->ne('done')->andWhere('t2.status')->ne('closed')->fi() + ->beginIF($status == 'undone')->andWhere('t2.status')->notIN('done,closed')->fi() ->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi() ->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi() ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi() @@ -735,7 +735,7 @@ class projectModel extends model else { return $this->dao->select('*, IF(INSTR(" done,closed", status) < 2, 0, 1) AS isDone')->from(TABLE_PROJECT)->where('iscat')->eq(0) - ->beginIF($status == 'undone')->andWhere('status')->ne('done')->andWhere('status')->ne('closed')->fi() + ->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi() ->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi() ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi() ->andWhere('deleted')->eq(0) diff --git a/module/task/model.php b/module/task/model.php index 99e008a132..d6082781f4 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1652,7 +1652,7 @@ class taskModel extends model ->andWhere("((t4.`account` = '{$this->app->user->account}' AND t4.`type` = 'task') OR t1.`assignedTo` = '{$this->app->user->account}' OR t1.`finishedby` = '{$this->app->user->account}')") ->fi() ->beginIF($productID)->andWhere("((t5.root=" . (int)$productID . " and t5.type='story') OR t2.product=" . (int)$productID . ")")->fi() - ->beginIF($type == 'undone')->andWhere('t1.status')->ne('done')->andWhere('t1.status')->ne('closed')->fi() + ->beginIF($type == 'undone')->andWhere('t1.status')->notIN('done,closed')->fi() ->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi() ->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi() ->beginIF($type == 'finishedbyme')