* Add story for todo

This commit is contained in:
滔哥
2017-11-15 16:52:27 +08:00
parent f425743a8d
commit 602a95cfd2
4 changed files with 21 additions and 15 deletions
+6 -4
View File
@@ -236,8 +236,9 @@ class todoModel extends model
if(!$todo) return false;
$todo = $this->loadModel('file')->replaceImgURL($todo, 'desc');
if($setImgSize) $todo->desc = $this->file->setImgSize($todo->desc);
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
$todo->date = str_replace('-', '', $todo->date);
return $todo;
}
@@ -336,8 +337,9 @@ class todoModel extends model
if($this->config->global->flow == 'onlyTask' and $todo->type == 'bug') continue;
if($this->config->global->flow == 'onlyStory' and $todo->type != 'custom') continue;
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
$todo->begin = date::formatTime($todo->begin);
$todo->end = date::formatTime($todo->end);