* Use the function processStatus to get status of a record.
This commit is contained in:
@@ -76,4 +76,19 @@ class model extends baseModel
|
||||
$object = preg_replace('/^' . preg_quote($this->config->db->prefix) . '/', '', trim($table, '`'));
|
||||
$this->loadModel('action')->create($object, $id, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process status of an object according to its subStatus.
|
||||
*
|
||||
* @param string $module product | release | story | project | task | bug | testcase | testtask | feedback
|
||||
* @param object $record a record of above modules.
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function processStatus($module, $record)
|
||||
{
|
||||
if(!isset($this->config->bizVersion) or empty($record->subStatus)) return zget($this->lang->$module->statusList, $record->status);
|
||||
|
||||
return $this->loadModel('workflowfield')->processSubStatus($module, $record);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user