* adjust for change subStatus when finish task by effort.

This commit is contained in:
wangyidong
2021-08-02 13:47:28 +08:00
parent 89b439d1da
commit 0f231bbf80
+5 -4
View File
@@ -1350,13 +1350,14 @@ EOD;
/**
* Create changes of one object.
*
* @param mixed $old the old object
* @param mixed $new the new object
* @param mixed $old the old object
* @param mixed $new the new object
* @param string $moduleName
* @static
* @access public
* @return array
*/
public static function createChanges($old, $new)
public static function createChanges($old, $new, $moduleName = '')
{
global $app, $config;
@@ -1373,7 +1374,7 @@ EOD;
if($oldID && $oldStatus && $newStatus && !$newSubStatus && $oldStatus != $newStatus)
{
$moduleName = $app->getModuleName();
if(empty($moduleName)) $moduleName = $app->getModuleName();
$field = $app->dbh->query('SELECT options FROM ' . TABLE_WORKFLOWFIELD . " WHERE `module` = '$moduleName' AND `field` = 'subStatus'")->fetch();
if(!empty($field->options)) $field->options = json_decode($field->options, true);