+ diff --git a/module/project/view/tree.html.php b/module/project/view/tree.html.php index ace6605f70..30fb1ba10c 100644 --- a/module/project/view/tree.html.php +++ b/module/project/view/tree.html.php @@ -47,6 +47,10 @@ createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=tree") : '#'; + echo html::a($link, "{$lang->export}", '', $misc); + $checkObject = new stdclass(); $checkObject->project = $projectID; $misc = common::hasPriv('task', 'create', $checkObject) ? "class='btn btn-primary'" : "class='btn btn-primary disabled'"; diff --git a/module/story/css/edit.css b/module/story/css/edit.css index c632e0be00..325971cb2f 100644 --- a/module/story/css/edit.css +++ b/module/story/css/edit.css @@ -1,3 +1 @@ -.col-side .chosen-container .chosen-drop {width: 216px!important} -.col-side .chosen-container {width: 218px!important} -.table-form>tbody>tr>th{padding-top:7px;} +#product_chosen .chosen-single{border-right-width:1px} diff --git a/module/task/control.php b/module/task/control.php index b86e447ef5..6ea6bba5ec 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -1424,6 +1424,7 @@ class task extends control $this->view->allExportFields = $allExportFields; $this->view->customExport = true; + $this->view->type = $type; $this->display(); } diff --git a/module/task/model.php b/module/task/model.php index c9eaed1c4d..ad069b273a 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -672,7 +672,7 @@ class taskModel extends model ->batchCheckIF($task->closedReason == 'cancel', 'finishedBy, finishedDate', 'empty') ->where('id')->eq((int)$taskID)->exec(); - if($oldTask->parent) + if($oldTask->parent > 0) { $this->updateParentStatus($taskID); $this->computeBeginAndEnd($oldTask->parent); @@ -1618,14 +1618,25 @@ class taskModel extends model ->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 != 'all')->andWhere("t1.`$type`")->eq($account)->fi() + ->beginIF($type == 'finishedBy') + ->andWhere('t1.finishedby', 1)->eq($this->app->user->account) + ->orWhere('t1.finishedList')->like("%,{$this->app->user->account},%") + ->markRight(1) + ->fi() + ->beginIF($type != 'all' and $type != 'finishedBy')->andWhere("t1.`$type`")->eq($account)->fi() ->orderBy($orderBy) ->beginIF($limit > 0)->limit($limit)->fi() ->page($pager) - ->fetchAll(); + ->fetchAll('id'); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task'); + $taskTeam = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in(array_keys($tasks))->andWhere('type')->eq('task')->fetchGroup('root'); + if(!empty($taskTeam)) + { + foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team; + } + if($tasks) return $this->processTasks($tasks); return array(); } diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index fb463bceb4..b191f1ec6e 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -87,7 +87,7 @@
task->legendBasic;?>
- parent)):?> + parent <= 0):?> diff --git a/module/user/view/task.html.php b/module/user/view/task.html.php index d886c319d9..3b872ffe87 100644 --- a/module/user/view/task.html.php +++ b/module/user/view/task.html.php @@ -55,8 +55,12 @@ - - + +
task->project;?> project, 'class="form-control chosen" onchange="loadAll(this.value)"');?>
createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?> task->priList, $task->pri, $task->pri);?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri)?>createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?>createLink('task', 'view', "taskID=$task->id"), $task->name);?>createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?> + team)) echo '' . $this->lang->task->multipleAB . ' ';?> + parent > 0) echo '' . $this->lang->task->childrenAB . ' ';?> + createLink('task', 'view', "taskID=$task->id"), $task->name, null, "style='color: $task->color'");?> + estimate;?> consumed;?> left;?>