* Finish task #54318.

This commit is contained in:
liumengyi
2022-05-19 08:55:27 +08:00
parent 79006b3f89
commit dee4ff7043
3 changed files with 10 additions and 1 deletions
+2
View File
@@ -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[''];
+2
View File
@@ -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[''];
+6 -1
View File
@@ -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')