* [bug#56941] process history data for deploy step.
This commit is contained in:
@@ -10416,25 +10416,28 @@ class upgradeModel extends model
|
||||
{
|
||||
if($step->parent || $step->stage == '') return;
|
||||
|
||||
$deployData[$deployID][$step->status][] = $step->id;
|
||||
if($step->result) $step->status = $step->result;
|
||||
$deployData[$deployID][$step->status][$step->id] = zget($this->lang->deploy->stageList, $step->stage);
|
||||
}
|
||||
}
|
||||
|
||||
$this->loadModel('action');
|
||||
foreach($deployData as $deployID => $steps)
|
||||
{
|
||||
foreach($steps as $status => $steps)
|
||||
foreach($steps as $status => $childs)
|
||||
{
|
||||
$parent = new stdclass();
|
||||
$parent->title = zget($this->lang->deploy->stageList, $status);
|
||||
$parent->title = current($childs);
|
||||
$parent->stage = '';
|
||||
$parent->deploy = $deployID;
|
||||
$parent->createdBy = $this->app->user->account;
|
||||
$parent->createdDate = helper::now();
|
||||
$parent->status = 'wait';
|
||||
$parent->status = $status;
|
||||
$this->dao->insert(TABLE_DEPLOYSTEP)->data($parent)->autoCheck()->exec();
|
||||
|
||||
$parentID = $this->dao->lastInsertID();
|
||||
$this->dao->update(TABLE_DEPLOYSTEP)->set('parent')->eq($parentID)->where('id')->in($steps)->exec();
|
||||
$this->action->create('deploy', $parentID, 'Created');
|
||||
$this->dao->update(TABLE_DEPLOYSTEP)->set('parent')->eq($parentID)->set('status')->eq($status)->where('id')->in(array_keys($childs))->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user