diff --git a/module/programplan/ui/create.html.php b/module/programplan/ui/create.html.php index 9b61b8e2df..37161f0a3c 100644 --- a/module/programplan/ui/create.html.php +++ b/module/programplan/ui/create.html.php @@ -22,7 +22,7 @@ $customKey = 'createFields'; $section = 'custom'; /* Generate custom config key by project model. */ -if(in_array($project->model, array('waterfallplus', 'ipd'))) $customKey = 'create' . ucfirst($project->model) . 'Fields'; +if(in_array($project->model, array('waterfallplus', 'ipd', 'waterfall'))) $customKey = 'create' . ucfirst($project->model) . 'Fields'; if($executionType == 'agileplus') { $section = 'customAgilePlus'; diff --git a/module/programplan/zen.php b/module/programplan/zen.php index d6faad3713..e57a041ff2 100644 --- a/module/programplan/zen.php +++ b/module/programplan/zen.php @@ -89,7 +89,8 @@ class programplanZen extends programplan if(!empty($this->config->setCode) && empty($plan->code) && strpos(",{$this->config->execution->create->requiredFields},", ',code,') !== false) dao::$errors["code[{$rowID}]"] = sprintf($this->lang->error->notempty, $plan->type == 'stage' ? $this->lang->execution->code : $this->lang->code); } - if(strpos(",{$this->config->programplan->list->customCreateFields},", ',percent,') === false) $plan->percent = 0; + $customKey = 'create' . ucfirst($project->model) . 'Fields'; + if(strpos(",{$this->config->programplan->$customKey},", ',percent,') === false) $plan->percent = 0; $totalPercent += $plan->percent; $names[] = $plan->name;