diff --git a/framework/control.class.php b/framework/control.class.php index 21e38d299c..c65488a6b0 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -594,7 +594,7 @@ class control extends baseControl if(!empty($this->app->installing) || !empty($this->app->upgrading)) return array(); $moduleName = $moduleName ? $moduleName : $this->app->rawModule; - $methodName = $methodName ? $moduleName : $this->app->rawMethod; + $methodName = $methodName ? $methodName : $this->app->rawMethod; $this->loadModel('flow'); $this->loadModel('workflowfield'); diff --git a/lib/form/form.class.php b/lib/form/form.class.php index 86ad59c372..ef6009fdad 100644 --- a/lib/form/form.class.php +++ b/lib/form/form.class.php @@ -115,6 +115,10 @@ class form extends fixer $moduleName = $moduleName ? $moduleName : $app->rawModule; $methodName = $methodName ? $moduleName : $app->rawMethod; + /* 项目发布和项目版本用自己的工作流。 */ + if($moduleName == 'projectrelease') $moduleName = 'release'; + if($moduleName == 'projectbuild') $moduleName = 'build'; + $flow = $app->control->loadModel('workflow')->getByModule($moduleName); if(!$flow) return $configObject; diff --git a/lib/zin/wg/formpanel/v1.php b/lib/zin/wg/formpanel/v1.php index 2b574c396b..ebead73e06 100644 --- a/lib/zin/wg/formpanel/v1.php +++ b/lib/zin/wg/formpanel/v1.php @@ -180,8 +180,26 @@ class formPanel extends panel $layout = $this->prop('layout'); if($layout == 'grid') return null; + $moduleName = $app->rawModule; + $methodName = $app->rawMethod; + + /* 项目发布和项目版本用自己的工作流。 */ + if($moduleName == 'projectrelease') $moduleName = 'release'; + if($moduleName == 'projectbuild') + { + if($methodName == 'browse') + { + $moduleName = 'execution'; + $methodName = 'build'; + } + else + { + $moduleName = 'build'; + } + } + $data = $this->getData(); - $fields = $app->control->appendExtendForm('info', $data); + $fields = $app->control->appendExtendForm('info', $data, $moduleName, $methodName); $extraMain = array(); foreach($fields as $field) { diff --git a/module/datatable/config.php b/module/datatable/config.php index e8d943365a..cb3ed6025f 100644 --- a/module/datatable/config.php +++ b/module/datatable/config.php @@ -1,13 +1,14 @@ datatable->moduleAlias['product-browse'] = 'story'; -$config->datatable->moduleAlias['execution-story'] = 'story'; -$config->datatable->moduleAlias['execution-task'] = 'task'; -$config->datatable->moduleAlias['program-project'] = 'project'; -$config->datatable->moduleAlias['project-bug'] = 'bug'; -$config->datatable->moduleAlias['execution-bug'] = 'bug'; -$config->datatable->moduleAlias['execution-build'] = 'build'; -$config->datatable->moduleAlias['project-build'] = 'build'; -$config->datatable->moduleAlias['execution-testcase'] = 'testcase'; +$config->datatable->moduleAlias['product-browse'] = 'story'; +$config->datatable->moduleAlias['execution-story'] = 'story'; +$config->datatable->moduleAlias['execution-task'] = 'task'; +$config->datatable->moduleAlias['program-project'] = 'project'; +$config->datatable->moduleAlias['project-bug'] = 'bug'; +$config->datatable->moduleAlias['execution-bug'] = 'bug'; +$config->datatable->moduleAlias['execution-build'] = 'build'; +$config->datatable->moduleAlias['project-build'] = 'build'; +$config->datatable->moduleAlias['execution-testcase'] = 'testcase'; +$config->datatable->moduleAlias['projectrelease-browse'] = 'release'; $config->datatable->noProductModule = ',review,';