Merge branch 'sprint/197_liumengyi_upgrade' into 'master'

* Add upgrade function of task #55677.

See merge request easycorp/zentaopms!3740
This commit is contained in:
孙广明
2022-06-06 05:43:40 +00:00
+28
View File
@@ -508,6 +508,9 @@ class upgradeModel extends model
$this->execSQL($xuanxuanSql);
}
break;
case '17_0_beta2':
$this->changeStoryNeedReview();
break;
}
$this->deletePatch();
@@ -6287,4 +6290,29 @@ class upgradeModel extends model
foreach ($executions as $execution) $this->dao->update(TABLE_PROJECT)->set('realBegan')->eq($execution->minBegan)->where('id')->eq($execution->project)->exec();
}
/**
* Change story need Review.
*
* @access public
* @return void
*/
public function changeStoryNeedReview()
{
$this->loadModel('story');
$this->loadModel('setting');
if(!empty($this->config->story->needReview))
{
$data = new stdclass();
$data->forceReview = '';
$data->forceReviewDepts = '';
$data->forceReviewRoles = '';
$this->setting->setItems("system.story@rnd", $data);
$this->setting->setItems("system.story@lite", $data);
}
$this->setting->deleteItems('owner=system&module=story&section=&key=forceReviewAll');
}
}