diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index 27db4a2da4..4409ea124d 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -98,7 +98,7 @@ date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?> todo->typeList, $todo->type, '');?> pri;?>' title='todo->priList, $todo->pri, $todo->pri);?>'>todo->priList, $todo->pri)?> - createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "data-toggle='modal' data-width='75%' data-type='iframe' data-title='" . $lang->todo->view . "' data-icon='check'");?> + createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "data-toggle='modal' data-width='80%' data-type='iframe' data-title='" . $lang->todo->view . "' data-icon='check'");?> assignedBy);?> begin;?> end;?> diff --git a/module/todo/model.php b/module/todo/model.php index 98728838f9..67dd7b7327 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -26,6 +26,7 @@ class todoModel extends model $idvalue = 0; if($hasObject && $objectType) $idvalue = $this->post->uid ? $this->post->$objectType : $this->post->idvalue; + $todo = fixer::input('post') ->add('account', $this->app->user->account) ->setDefault('idvalue', 0) @@ -38,6 +39,50 @@ class todoModel extends model ->remove(implode(',', $this->config->todo->moduleList) . ',uid') ->get(); + if(!isset($todo->pri)) + { + if($this->post->type == 'task') + { + $todo->pri = $this->dao->select('pri')->from(TABLE_TASK)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'bug') + { + $todo->pri = $this->dao->select('pri')->from(TABLE_BUG)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'story') + { + $todo->pri = $this->dao->select('pri')->from(TABLE_STORY)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'testtask') + { + $todo->pri = $this->dao->select('pri')->from(TABLE_TESTTASK)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'issue' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_ISSUE)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'risk' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_RISK)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'review' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_REVIEW)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'feedback' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_FEEDBACK)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + elseif($this->post->type == 'opportunity' and isset($this->config->maxVersion)) + { + $todo->pri = $this->dao->select('pri')->from(TABLE_OPPORTUNITY)->where('id')->eq($this->post->idvalue)->fetch('pri'); + } + + if($todo->pri == 'high') $todo->pri = 1; + if($todo->pri == 'middle') $todo->pri = 2; + if($todo->pri == 'low') $todo->pri = 3; + } + if($todo->type != 'custom') { $type = $todo->type;