Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/master_lanzongjun_fixbug

This commit is contained in:
Zongjun Lan
2022-04-18 14:15:19 +08:00
5 changed files with 12 additions and 8 deletions
+4 -3
View File
@@ -228,16 +228,17 @@ class block extends control
$blocks = $this->block->getBlockList($module, $type);
$vision = $this->config->vision;
$commonField = 'common';
$section = 'common';
if($module == 'project' and $projectID)
{
$project = $this->loadModel('project')->getByID($projectID);
$commonField = $project->model . 'common';
$project = $this->loadModel('project')->getByID($projectID);
$section = $project->model . 'common';
}
$inited = $this->dao->select('*')->from(TABLE_CONFIG)
->where('module')->eq($module)
->andWhere('owner')->eq($this->app->user->account)
->andWhere('`section`')->eq($section)->fi()
->andWhere('`key`')->eq('blockInited')
->andWhere('vision')->eq($vision)
->fetch('value');
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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
+4 -2
View File
@@ -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);
+2 -1
View File
@@ -11,12 +11,13 @@ fields:
range: 41-120{2},141-180{2}
- field: name
note: "名称"
range: 1-10000
fields:
- field: name1
range: 分支
- field: name2
range: 1-10000
- field: status
range: active,closed
- field: order
note: "排序"
range: 1-2