Merge branch 'fixbug_sunjun_qijian' into 'master'
Fixbug sunjun qijian See merge request easycorp/zentaopms!2970
This commit is contained in:
@@ -218,7 +218,7 @@ class todo extends control
|
||||
$bugs = $this->bug->getUserBugPairs($account, true, 0, '', '', isset($objectIDList['bug']) ? $objectIDList['bug'] : '');
|
||||
$tasks = $this->task->getUserTaskPairs($account, 'wait,doing', '', isset($objectIDList['task']) ? $objectIDList['task'] : '');
|
||||
$storys = $this->loadModel('story')->getUserStoryPairs($account, 10, 'story', '', isset($objectIDList['story']) ? $objectIDList['story'] : '');
|
||||
if($this->config->edition != 'open') $this->view->feedbacks = $this->loadModel('feedback')->getUserFeedbackPairs($account);
|
||||
if($this->config->edition != 'open') $this->view->feedbacks = $this->loadModel('feedback')->getUserFeedbackPairs($account, '', isset($objectIDList['feedback']) ? $objectIDList['feedback'] : '');
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$issues = $this->loadModel('issue')->getUserIssuePairs($account);
|
||||
|
||||
@@ -12,7 +12,7 @@ function switchDateTodo(switcher)
|
||||
/**
|
||||
* Load data.
|
||||
* @param type $type Type of selected todo.
|
||||
* @param id $id ID of selected todo.
|
||||
* @param id $id ID of selected todo.
|
||||
* @param defaultType $defaultType Default type of selected todo.
|
||||
* @param idvalue $idvalue ID of the closed todo type.
|
||||
* @access public
|
||||
|
||||
@@ -347,10 +347,10 @@ class todoModel extends model
|
||||
foreach($todos as $todoID => $todo)
|
||||
{
|
||||
$oldTodo = $oldTodos[$todoID];
|
||||
if($oldTodo->type == 'bug' or $oldTodo->type == 'task' or $oldTodo->type == 'story' or $oldTodo->type == 'feedback') $oldTodo->name = '';
|
||||
if(in_array($todo->type, $this->config->todo->moduList)) $oldTodo->name = '';
|
||||
$this->dao->update(TABLE_TODO)->data($todo)
|
||||
->autoCheck()
|
||||
->checkIF(in_array($todo->type, array('custom', 'feedback')), $this->config->todo->edit->requiredFields, 'notempty')
|
||||
->checkIF(!in_array($todo->type, $this->config->todo->moduleList), $this->config->todo->edit->requiredFields, 'notempty')
|
||||
->checkIF($todo->type == 'bug' and $todo->idvalue == 0, 'idvalue', 'notempty')
|
||||
->checkIF($todo->type == 'task' and $todo->idvalue == 0, 'idvalue', 'notempty')
|
||||
->checkIF($todo->type == 'story' and $todo->idvalue == 0, 'idvalue', 'notempty')
|
||||
@@ -435,6 +435,7 @@ class todoModel extends model
|
||||
if($todo->type == 'opportunity' and $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_OPPORTUNITY)->fetch('name');
|
||||
if($todo->type == 'review' and $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title');
|
||||
if($todo->type == 'testtask') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TESTTASK)->fetch('name');
|
||||
if($todo->type == 'feedback') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_FEEDBACK)->fetch('title');
|
||||
$todo->date = str_replace('-', '', $todo->date);
|
||||
return $todo;
|
||||
}
|
||||
@@ -552,6 +553,7 @@ class todoModel extends model
|
||||
if($todo->type == 'risk' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_RISK)->fetch('name');
|
||||
if($todo->type == 'opportunity' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_OPPORTUNITY)->fetch('name');
|
||||
if($todo->type == 'review' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title');
|
||||
if($todo->type == 'feedback' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_FEEDBACK)->fetch('title');
|
||||
$todo->begin = date::formatTime($todo->begin);
|
||||
$todo->end = date::formatTime($todo->end);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user