Merge branch 'branch/workflow' of https://gitlab.zcorp.cc/easycorp/zentaopms into branch/workflow
This commit is contained in:
@@ -88,7 +88,7 @@ class control extends baseControl
|
||||
* Det default priv by workflow.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function setDefaultPrivByWorkflow()
|
||||
{
|
||||
@@ -313,18 +313,17 @@ class control extends baseControl
|
||||
* @param object $object product|project|productplan|release|build|story|task|bug|testtask|testcase|testsuite
|
||||
* @param string $displayOn view|browse
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function buildOperateMenu($object, $type = 'view')
|
||||
{
|
||||
if(!isset($this->config->bizVersion)) return false;
|
||||
|
||||
$moduleName = $this->moduleName;
|
||||
if($moduleName == 'bug') return $this->$moduleName->buildOperateMenu($object, $type);
|
||||
if($moduleName == 'bug' || $moduleName == 'feedback') return $this->$moduleName->buildOperateMenu($object, $type);
|
||||
|
||||
$flow = $this->loadModel('workflow')->getByModule($moduleName);
|
||||
return $this->loadModel('flow')->buildOperateMenu($flow, $object, $type);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -410,7 +409,7 @@ class control extends baseControl
|
||||
*
|
||||
* @param string $viewFile
|
||||
* @access public
|
||||
* @return void
|
||||
* @return bool|string
|
||||
*/
|
||||
public function printViewFile($viewFile)
|
||||
{
|
||||
|
||||
@@ -2793,6 +2793,7 @@ class bugModel extends model
|
||||
*
|
||||
* @param string $bug
|
||||
* @param string $action
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -3232,12 +3233,12 @@ class bugModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Build operateMenu.
|
||||
* Build bug menu.
|
||||
*
|
||||
* @param object $bug
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function buildOperateMenu($bug, $type = 'view')
|
||||
{
|
||||
@@ -3269,6 +3270,7 @@ class bugModel extends model
|
||||
$menu .= $this->buildMenu('bug', 'edit', $params, $bug, $type);
|
||||
if($this->app->tab != 'product') $menu .= $this->buildMenu('bug', 'create', $copyParams, $bug, $type, 'copy');
|
||||
if($type == 'view') $menu .= $this->buildMenu('bug', 'delete', $params, $bug, $type, 'trash', 'hiddenwin', "showinonlybody");
|
||||
|
||||
return $menu;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ class caselibModel extends model
|
||||
->batchcheck($this->config->caselib->edit->requiredFields, 'notempty')
|
||||
->checkFlow()
|
||||
->where('id')->eq($libID)
|
||||
->checkFlow()
|
||||
->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
|
||||
@@ -1560,6 +1560,7 @@ EOD;
|
||||
* @param string $extraClass
|
||||
* @param bool $onlyBody
|
||||
* @param string $misc
|
||||
* @Param bool $extraEnabled
|
||||
* @static
|
||||
* @access public
|
||||
* @return void
|
||||
|
||||
@@ -518,6 +518,7 @@ class executionModel extends model
|
||||
->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage')")
|
||||
->checkFlow()
|
||||
->where('id')->eq($executionID)
|
||||
->checkFlow()
|
||||
->limit(1)
|
||||
->exec();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user