diff --git a/module/task/control.php b/module/task/control.php index 4f4de08e01..e7d5578ab6 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 437861bdf8..0d3b43e45b 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 7414b7809c..7b3470c919 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'):?>
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;