This commit is contained in:
tianshujie
2022-07-14 14:46:46 +08:00
parent b9859380ff
commit 711c0e9e8c
7 changed files with 61 additions and 15 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 */
$executionType = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('type');
if($executionType == 'ops')
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('lifetime');
if($executionLifetime == 'ops')
{
$requiredFields = str_replace(",story,", ',', "$requiredFields");
$task->story = 0;
@@ -381,9 +381,9 @@ class taskModel extends model
}
/* Fix bug #1525*/
$executionType = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('type');
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('lifetime');
$requiredFields = ',' . $this->config->task->create->requiredFields . ',';
if($executionType == 'ops') $requiredFields = str_replace(',story,', ',', $requiredFields);
if($executionLifetime == 'ops') $requiredFields = str_replace(',story,', ',', $requiredFields);
$requiredFields = trim($requiredFields, ',');
/* check data. */
@@ -1036,9 +1036,9 @@ class taskModel extends model
$task->mode = '';
}
$executionType = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($task->execution)->fetch('type');
$executionLifetime = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($task->execution)->fetch('lifetime');
$requiredFields = "," . $this->config->task->edit->requiredFields . ",";
if($executionType == 'ops')
if($executionLifetime == 'ops')
{
$requiredFields = str_replace(",story,", ',', "$requiredFields");
$task->story = 0;