From 5e464f8b85774bb262dc879c85c16be6241946e3 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 15 Jul 2022 13:09:24 +0800 Subject: [PATCH 1/2] * Fix bug #25375. --- module/upgrade/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index d92a655196..450dd6afd5 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -4742,6 +4742,7 @@ class upgradeModel extends model $data->begin = $projects[$projectID]->begin; $data->end = $projects[$projectID]->end; $data->projectStatus = $projects[$projectID]->status; + $data->team = $projects[$projectID]->team; $data->PM = $projects[$projectID]->PM; $data->projectAcl = $projects[$projectID]->acl == 'custom' ? 'private' : $projects[$projectID]->acl; From 656cc5f060e9d6ce876e0fe12c2739d1cfb8351a Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 15 Jul 2022 14:07:32 +0800 Subject: [PATCH 2/2] * Fix bug #25321. --- module/task/control.php | 2 +- module/task/js/create.js | 2 +- module/task/model.php | 12 ++++++------ module/task/view/batchcreate.html.php | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 0aaa687020..a737a5b418 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -438,7 +438,7 @@ class task extends control $customFields[$field] = $this->lang->task->$field; } - if($execution->lifetime == 'ops') unset($customFields['story']); + if($execution->lifetime == 'ops' or $execution->attribute == 'request' or $execution->attribute == 'review') unset($customFields['story']); $this->view->customFields = $customFields; $this->view->showFields = $this->config->task->custom->batchCreateFields; diff --git a/module/task/js/create.js b/module/task/js/create.js index ab94beed36..0c8f586ca3 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -6,7 +6,7 @@ $(function() var fieldList = showFields + ','; var requiredList = ',' + requiredFields + ','; - if(lifetime == 'ops') + if(lifetime == 'ops' || (typeof execAttribute != 'undefined' && (execAttribute == 'request' || execAttribute == 'review'))) { $('#fieldsstory').parent('div').addClass('hidden'); } diff --git a/module/task/model.php b/module/task/model.php index 05c7217e63..4ae8093b3a 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -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; diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 7c0c74879b..45e08a1aa3 100755 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -45,7 +45,7 @@ $colspan = count($visibleFields) + 3; task->batchCreate;?> - lifetime != 'ops'):?> + lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?> @@ -67,7 +67,7 @@ $colspan = count($visibleFields) + 3; idAB;?> moduleBox'>task->module?> - lifetime != 'ops'):?> + lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?> storyBox'>task->story;?> task->name;?> @@ -99,7 +99,7 @@ $colspan = count($visibleFields) + 3; $lang->task->typeList['ditto'] = $lang->task->ditto; $members['ditto'] = $lang->task->ditto; $modules['ditto'] = $lang->task->ditto; - if($execution->lifetime == 'ops') $colspan = $colspan - 1; + if($execution->lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review') $colspan = $colspan - 1; ?> task->batchCreate; $i++):?> id)'")?> - lifetime != 'ops'):?> + lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>
@@ -266,7 +266,7 @@ $colspan = count($visibleFields) + 3; - lifetime != 'ops'):?> + lifetime != 'ops' and $execution->attribute != 'request' and $execution->attribute != 'review'):?>