*Finish task #45150.

This commit is contained in:
zhengrunyu
2021-12-01 10:30:41 +08:00
parent 3e4fa30030
commit e42d3ebed7
3 changed files with 5 additions and 9 deletions
+1 -1
View File
@@ -3442,7 +3442,7 @@ class execution extends control
public function ajaxUpdateKanban($executionID = 0, $enterTime = '', $browseType = '', $groupBy = '')
{
$enterTime = date('Y-m-d H:i:s', $enterTime);
$lastEditedTime = $this->dao->select("max(lastEditedTime) as lastEditedTime")->from(TABLE_KANBANLANE)->where('execution')->eq($executionID)->fetch();
$lastEditedTime = $this->dao->select("max(lastEditedTime) as lastEditedTime")->from(TABLE_KANBANLANE)->where('execution')->eq($executionID)->fetch('lastEditedTime');
if($lastEditedTime > $enterTime)
{
+2 -4
View File
@@ -710,7 +710,6 @@ class executionModel extends model
{
$oldExecution = $this->getById($executionID);
$now = helper::now();
$requiredFields = $this->config->execution->start->requiredFields;
$execution = fixer::input('post')
->setDefault('status', 'doing')
@@ -721,7 +720,7 @@ class executionModel extends model
$this->dao->update(TABLE_EXECUTION)->data($execution)
->autoCheck()
->check($requiredFields, 'notempty')
->check($this->config->execution->start->requiredFields, 'notempty')
->checkIF($execution->realBegan != '', 'realBegan', 'le', helper::today())
->where('id')->eq((int)$executionID)
->exec();
@@ -864,7 +863,6 @@ class executionModel extends model
{
$oldExecution = $this->getById($executionID);
$now = helper::now();
$requiredFields = $this->config->execution->close->requiredFields;
$execution = fixer::input('post')
->setDefault('status', 'closed')
@@ -877,7 +875,7 @@ class executionModel extends model
$this->dao->update(TABLE_EXECUTION)->data($execution)
->autoCheck()
->check($requiredFields,'notempty')
->check($this->config->execution->close->requiredFields,'notempty')
->checkIF($execution->realEnd != '', 'realEnd', 'le', helper::today())
->checkIF($execution->realEnd != '', 'realEnd', 'ge', $oldExecution->realBegan)
->where('id')->eq((int)$executionID)
+2 -4
View File
@@ -1172,7 +1172,6 @@ class projectModel extends model
{
$oldProject = $this->getById($projectID, $type);
$now = helper::now();
$requiredFields = $this->config->project->start->requiredFields;
$project = fixer::input('post')
->setDefault('status', 'doing')
@@ -1182,7 +1181,7 @@ class projectModel extends model
$this->dao->update(TABLE_PROJECT)->data($project)
->autoCheck()
->check($requiredFields, 'notempty')
->check($this->config->project->start->requiredFields, 'notempty')
->checkIF($project->realBegan != '', 'realBegan', 'le', helper::today())
->where('id')->eq((int)$projectID)
->exec();
@@ -1321,7 +1320,6 @@ class projectModel extends model
{
$oldProject = $this->getById($projectID);
$now = helper::now();
$requiredFields = $this->config->project->close->requiredFields;
$project = fixer::input('post')
->setDefault('status', 'closed')
@@ -1334,7 +1332,7 @@ class projectModel extends model
$this->dao->update(TABLE_PROJECT)->data($project)
->autoCheck()
->check($requiredFields, 'notempty')
->check($this->config->project->close->requiredFields, 'notempty')
->checkIF($project->realEnd != '', 'realEnd', 'le', helper::today())
->checkIF($project->realEnd != '', 'realEnd', 'ge', $oldProject->realBegan)
->where('id')->eq((int)$projectID)