Merge branch 'sprint/feedback2356' into 'master'
Sprint/feedback2356 See merge request easycorp/zentaopms!7140
This commit is contained in:
@@ -5767,6 +5767,12 @@ class executionModel extends model
|
||||
$post = $_POST;
|
||||
|
||||
$_POST = array();
|
||||
$extendFields = $this->getExtendFields();
|
||||
foreach(array_keys($extendFields) as $field)
|
||||
{
|
||||
if(isset($post[$field])) $_POST[$field] = $post[$field];
|
||||
}
|
||||
|
||||
$_POST['project'] = $projectID;
|
||||
$_POST['name'] = $project->name;
|
||||
$_POST['begin'] = $project->begin;
|
||||
@@ -5820,6 +5826,12 @@ class executionModel extends model
|
||||
$post = $_POST;
|
||||
|
||||
$_POST = array();
|
||||
$extendFields = $this->getExtendFields();
|
||||
foreach(array_keys($extendFields) as $field)
|
||||
{
|
||||
if(isset($post[$field])) $_POST[$field] = $post[$field];
|
||||
}
|
||||
|
||||
$_POST['project'] = $projectID;
|
||||
$_POST['name'] = $project->name;
|
||||
$_POST['begin'] = $project->begin;
|
||||
@@ -6001,4 +6013,23 @@ class executionModel extends model
|
||||
}
|
||||
return $sortedExecutions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Extend Fields in workflow.
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getExtendFields($module = 'project')
|
||||
{
|
||||
$extendFields = $this->dao->select('field')
|
||||
->from(TABLE_WORKFLOWFIELD)
|
||||
->where('module')->eq('project')
|
||||
->andWhere('buildin')->eq(0)
|
||||
->andWhere('role')->eq('custom')
|
||||
->fetchPairs('field');
|
||||
|
||||
return $extendFields;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2979,4 +2979,17 @@ class executionTest
|
||||
}
|
||||
return $executionIDList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user custom workflow field.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getExtendFieldsTest($moduleName = 'project')
|
||||
{
|
||||
$extendFields = $this->executionModel->getExtendFields($moduleName);
|
||||
return $extendFields;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user