diff --git a/module/doc/ui/uploaddocs.html.php b/module/doc/ui/uploaddocs.html.php
index 0203d0e1ce..e6e73143c4 100644
--- a/module/doc/ui/uploaddocs.html.php
+++ b/module/doc/ui/uploaddocs.html.php
@@ -83,7 +83,7 @@ formPanel
set::label($lang->doc->module),
set::name('parent'),
set::items(array('m_0' => '/') + $optionMenu),
- set::value($moduleID ? "m_$moduleID" : 0),
+ set::value(!empty($doc->parent) ? $doc->parent : ($moduleID ? "m_$moduleID" : 0)),
set::required(true)
),
formGroup
diff --git a/module/upgrade/model.php b/module/upgrade/model.php
index d867e42ab9..a6bcce3468 100644
--- a/module/upgrade/model.php
+++ b/module/upgrade/model.php
@@ -11496,18 +11496,7 @@ class upgradeModel extends model
*/
public function createOtherActivity(int $workflowGroupID): int
{
- /* 创建其他过程分类。 */
- $module = new stdclass();
- $module->root = $workflowGroupID;
- $module->name = $this->lang->upgrade->projectManage;
- $module->parent = '0';
- $module->grade = '1';
- $module->type = 'process';
- $module->deleted = '0';
- $this->dao->insert(TABLE_MODULE)->data($module)->exec();
-
- $moduleID = $this->dao->lastInsertID();
- $this->dao->update(TABLE_MODULE)->set('path')->eq(",$moduleID,")->where('id')->eq($moduleID)->exec();
+ $moduleID = $this->dao->select('id')->from(TABLE_MODULE)->where('root')->eq($workflowGroupID)->andWhere('type')->eq('process')->andWhere('extra')->eq('project')->fetch('id');
$process = new stdclass();
$process->workflowGroup = $workflowGroupID;
diff --git a/module/upgrade/tao.php b/module/upgrade/tao.php
index e4b157d75c..afab697168 100644
--- a/module/upgrade/tao.php
+++ b/module/upgrade/tao.php
@@ -960,7 +960,7 @@ class upgradeTao extends upgradeModel
foreach($classifyList as $key => $value)
{
$order = isset($orderList[$key]) ? $orderList[$key] : $customOrder;
- $moduleID = $this->createProcessModule($groupID, $value, $order);
+ $moduleID = $this->createProcessModule($groupID, $key, $value, $order);
$classifyModule[$key] = $moduleID;
if(!isset($orderList[$key])) $customOrder += 10;
}
@@ -972,12 +972,13 @@ class upgradeTao extends upgradeModel
* 创建过程模块。
* Create process module.
*
- * @param int $groupID 流程ID
- * @param string $name 模块名称
- * @param int $order 排序
+ * @param int $groupID 流程ID
+ * @param string $key 模块标识
+ * @param string $name 模块名称
+ * @param int $order 排序
* @return int
*/
- protected function createProcessModule(int $groupID, string $name, int $order)
+ protected function createProcessModule(int $groupID, string $key, string $name, int $order)
{
$module = new stdclass();
$module->root = $groupID;
@@ -986,6 +987,7 @@ class upgradeTao extends upgradeModel
$module->grade = '1';
$module->order = $order;
$module->type = 'process';
+ $module->extra = $key;
$this->dao->insert(TABLE_MODULE)->data($module)->exec();
$moduleID = $this->dao->lastInsertID();