diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index a653f8e02b..8236f40263 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -260,6 +260,7 @@ $lang->execution->RDKanban = 'Research & Development Kanban'; $lang->execution->allTasks = 'All'; $lang->execution->assignedToMe = 'My'; $lang->execution->myInvolved = 'Involved'; +$lang->execution->assignedByMe = 'AssignedByMe'; $lang->execution->statusSelects[''] = 'More'; $lang->execution->statusSelects['wait'] = 'Waiting'; @@ -443,6 +444,7 @@ $lang->execution->featureBar['task']['all'] = $lang->execution->allTask $lang->execution->featureBar['task']['unclosed'] = $lang->execution->unclosed; $lang->execution->featureBar['task']['assignedtome'] = $lang->execution->assignedToMe; $lang->execution->featureBar['task']['myinvolved'] = $lang->execution->myInvolved; +$lang->execution->featureBar['task']['assignedbyme'] = $lang->execution->assignedByMe; $lang->execution->featureBar['task']['delayed'] = 'Delayed'; $lang->execution->featureBar['task']['needconfirm'] = 'Changed'; $lang->execution->featureBar['task']['status'] = $lang->execution->statusSelects['']; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 060c63b27f..80299ff188 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -260,6 +260,7 @@ $lang->execution->RDKanban = '研发看板'; $lang->execution->allTasks = '所有'; $lang->execution->assignedToMe = '指派给我'; $lang->execution->myInvolved = '由我参与'; +$lang->execution->assignedByMe = '由我指派'; $lang->execution->statusSelects[''] = '更多'; $lang->execution->statusSelects['wait'] = '未开始'; @@ -443,6 +444,7 @@ $lang->execution->featureBar['task']['all'] = $lang->execution->allTask $lang->execution->featureBar['task']['unclosed'] = $lang->execution->unclosed; $lang->execution->featureBar['task']['assignedtome'] = $lang->execution->assignedToMe; $lang->execution->featureBar['task']['myinvolved'] = $lang->execution->myInvolved; +$lang->execution->featureBar['task']['assignedbyme'] = $lang->execution->assignedByMe; $lang->execution->featureBar['task']['delayed'] = '已延期'; $lang->execution->featureBar['task']['needconfirm'] = "{$lang->SRCommon}变更"; $lang->execution->featureBar['task']['status'] = $lang->execution->statusSelects['']; diff --git a/module/task/model.php b/module/task/model.php index f04071e1dc..430a31976b 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2186,6 +2186,10 @@ class taskModel extends model if(is_string($type)) $type = strtolower($type); $fields = 'DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName'; $this->config->edition == 'max' && $fields .= ', t6.name as designName, t6.version as latestDesignVersion'; + + $actionID = array(); + if($type == 'assignedbyme') $actionID = $this->dao->select('objectID')->from(TABLE_ACTION)->where('objectType')->eq('task')->andWhere('action')->eq('assigned')->andWhere('actor')->eq($this->app->user->account)->fetchPairs('objectID', 'objectID'); + $tasks = $this->dao->select($fields) ->from(TABLE_TASK)->alias('t1') ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') @@ -2207,8 +2211,9 @@ class taskModel extends model ->markRight(1) ->fi() ->beginIF($type == 'delayed')->andWhere('t1.deadline')->gt('1970-1-1')->andWhere('t1.deadline')->lt(date(DT_DATE1))->andWhere('t1.status')->in('wait,doing')->fi() - ->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi() + ->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,assignedbyme,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi() ->beginIF($modules)->andWhere('t1.module')->in($modules)->fi() + ->beginIF($type == 'assignedbyme')->andWhere('t1.id')->in($actionID)->andWhere('t1.status')->ne('closed')->fi() ->andWhere('t1.deleted')->eq(0) ->orderBy($orderBy) ->page($pager, 't1.id')