Merge branch 'sprint/tianshujie_fixbug' into 'master'

Sprint/tianshujie fixbug

See merge request easycorp/zentaopms!4582
This commit is contained in:
孙广明
2022-07-15 06:16:50 +00:00
5 changed files with 14 additions and 13 deletions
+6 -6
View File
@@ -116,8 +116,8 @@ class taskModel extends model
$task = $this->loadModel('file')->processImgURL($task, $this->config->task->editor->create['id'], $this->post->uid);
/* Fix Bug #1525 */
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('lifetime');
if($executionLifetime == 'ops')
$execution = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch();
if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review')
{
$requiredFields = str_replace(",story,", ',', "$requiredFields");
$task->story = 0;
@@ -381,9 +381,9 @@ class taskModel extends model
}
/* Fix bug #1525*/
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('lifetime');
$execution = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch();
$requiredFields = ',' . $this->config->task->create->requiredFields . ',';
if($executionLifetime == 'ops') $requiredFields = str_replace(',story,', ',', $requiredFields);
if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review') $requiredFields = str_replace(',story,', ',', $requiredFields);
$requiredFields = trim($requiredFields, ',');
/* check data. */
@@ -1036,9 +1036,9 @@ class taskModel extends model
$task->mode = '';
}
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($task->execution)->fetch('lifetime');
$execution = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch();
$requiredFields = "," . $this->config->task->edit->requiredFields . ",";
if($executionLifetime == 'ops')
if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review')
{
$requiredFields = str_replace(",story,", ',', "$requiredFields");
$task->story = 0;