diff --git a/module/custom/config.php b/module/custom/config.php index 4b000df4ce..29873486f9 100644 --- a/module/custom/config.php +++ b/module/custom/config.php @@ -53,7 +53,7 @@ $config->custom->fieldList['task']['edit'] = 'pri,estimate,estStarted, $config->custom->fieldList['task']['finish'] = 'comment'; $config->custom->fieldList['task']['activate'] = 'assignedTo,comment'; $config->custom->fieldList['build'] = 'scmPath,filePath,desc'; -$config->custom->fieldList['bug']['create'] = 'module,project,deadline,type,os,browser,severity,pri,steps,keywords'; +$config->custom->fieldList['bug']['create'] = 'module,deadline,type,os,browser,severity,pri,steps,keywords'; $config->custom->fieldList['bug']['edit'] = 'plan,assignedTo,deadline,type,os,browser,severity,pri,steps,keywords'; $config->custom->fieldList['bug']['resolve'] = 'resolvedBuild,resolvedDate,assignedTo,comment'; $config->custom->fieldList['testcase']['create'] = 'stage,story,pri,precondition,keywords'; diff --git a/module/upgrade/model.php b/module/upgrade/model.php index db57a0e47c..36bf1fac6e 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -688,6 +688,11 @@ class upgradeModel extends model $this->saveLogs('Execute 15_0_3'); $this->execSQL($this->getUpgradeFile('15.0.3')); $this->appendExec('15_0_3'); + case '15_3': + $this->saveLogs('Execute 15_3'); + $this->execSQL($this->getUpgradeFile('15.3')); + $this->adjustBugRequired(); + $this->appendExec('15_3'); } $this->deletePatch(); @@ -5141,4 +5146,24 @@ class upgradeModel extends model $this->loadModel("gitlab")->initWebhooks($products, $gitlabID, $gitlabProject); } } + + /** + * Required to adjust the bug. + * + * @access public + * @return void + */ + public function adjustBugRequired() + { + $data = $this->dao->select('*')->from(TABLE_CONFIG) + ->where('owner')->eq('system') + ->andWhere('module')->eq('bug') + ->andWhere('section')->eq('create') + ->andWhere('`key`')->eq('requiredFields') + ->fetch(); + + $data->value = ',' . $data->value . ','; + $data->value = str_replace(',project,', ',', $data->value); + $this->dao->update(TABLE_CONFIG)->set('value')->eq(trim($data->value, ','))->where('id')->eq($data->id)->exec(); + } }