* [task#150564] Set stage point when create programplan.

This commit is contained in:
xieqiyu
2025-10-16 02:11:26 +00:00
parent c891a4f11a
commit 0ec6fbe98d
4 changed files with 14 additions and 10 deletions
+5 -5
View File
@@ -251,12 +251,12 @@ window.handleRenderRow = function($row, index, data)
if(typeof data != 'undefined' && typeof data.attribute != 'undefined' && !disabled)
{
const attribute = data.attribute;
for(let point in ipdStagePoint[attribute])
const stageID = data.stageID;
for(let point in ipdStagePoint[stageID])
{
let disabled = false
let value = ipdStagePoint[attribute][point];
let hint = value;
let text = ipdStagePoint[stageID][point];
let hint = text;
/* 如果已经评审过,则置灰不能选。*/
if(reviewedPoints[value] !== undefined && reviewedPoints[value].disabled)
@@ -265,7 +265,7 @@ window.handleRenderRow = function($row, index, data)
hint = reviewedPointTip;
}
items.push({text: value, value: value, disabled: disabled, hint: hint});
items.push({text: text, value: point, disabled: disabled, hint: hint});
}
}
+1 -1
View File
@@ -557,7 +557,7 @@ class programplanTao extends programplanModel
$this->insertProjectSpec($stageID, $plan);
/* Ipd project create default review points. */
if($project && $project->model == 'ipd' && $this->config->edition == 'ipd' && !$parentID) $this->loadModel('review')->createDefaultPoint($project->id, $productID, $plan->attribute);
if($project && $project->model == 'ipd' && $this->config->edition == 'ipd' && !$parentID) $this->loadModel('review')->createDefaultPoint($project->id);
if($plan->type == 'kanban')
{
+5 -2
View File
@@ -201,7 +201,9 @@ $fnGenerateDefaultData = function() use ($config, $plans, $planID, $stages, $exe
{
foreach($stages as $stage)
{
$points = !empty($enabledPoints->{$stage->type}) ? $enabledPoints->{$stage->type} : array();
$TRpoints = isset($stage->pointList['TR']) ? array_keys($stage->pointList['TR']) : array();
$DCPpoints = isset($stage->pointList['DCP']) ? array_keys($stage->pointList['DCP']) : array();
$points = array_merge($TRpoints, $DCPpoints);
$item = new stdClass();
$item->name = $stage->name;
@@ -212,6 +214,7 @@ $fnGenerateDefaultData = function() use ($config, $plans, $planID, $stages, $exe
$item->milestone = 0;
$item->point = implode(',', $points);
$item->parallel = 0;
$item->stageID = $stage->id;
$items[] = $item;
}
@@ -273,7 +276,7 @@ jsVar('childEnabledTip', $lang->programplan->childEnabledTip);
jsVar('typeList', $lang->execution->typeList);
jsVar('confirmCreateTip', $lang->project->confirmCreateStage);
jsVar('errorLang', $lang->programplan->error);
jsVar('ipdStagePoint', $project->model == 'ipd' ? $config->review->ipdReviewPoint : array());
jsVar('ipdStagePoint', $project->model == 'ipd' ? $ipdStagePoint : array());
jsVar('attributeList', $project->model == 'ipd' ? $lang->stage->ipdTypeList : $lang->stage->typeList);
jsVar('reviewedPoints', $project->model == 'ipd' ? $reviewedPoints : array());
jsVar('reviewedPointTip', $project->model == 'ipd' ? $lang->programplan->reviewedPointTip : '');