* [task#154463,doing,0.5h] modify mail title.
This commit is contained in:
@@ -327,6 +327,8 @@ class mailTao extends mailModel
|
||||
protected function getObjectTitle(object $object, string $objectType): string
|
||||
{
|
||||
$this->loadModel('action');
|
||||
if($objectType == 'auditplan') return $this->lang->auditplan->common . ' #' . $object->id;
|
||||
|
||||
$nameFields = zget($this->config->action->objectNameFields, $objectType, array());
|
||||
return zget($object, $nameFields, '');
|
||||
}
|
||||
|
||||
@@ -214,6 +214,7 @@ class messageModel extends model
|
||||
$moduleName = $objectType == 'case' ? 'testcase' : $objectType;
|
||||
if($objectType == 'kanbancard') $moduleName = 'kanban';
|
||||
if($objectType == 'feedback' && $this->config->vision == 'rnd') $methodNmae = 'adminView';
|
||||
if($objectType == 'auditplan') $object->title = $this->lang->auditplan->common . ' #' . $object->id;
|
||||
$space = common::checkNotCN() ? ' ' : '';
|
||||
$data = ($actor == 'guest' ? 'guest' : $user->realname) . $space . $this->lang->action->label->{$actionType} . $space . $this->lang->action->objectTypes[$objectType];
|
||||
$dataID = $objectType == 'kanbancard' ? $object->kanban : $objectID;
|
||||
|
||||
@@ -349,7 +349,9 @@ class webhookModel extends model
|
||||
static $users = array();
|
||||
if(empty($users)) $users = $this->loadModel('user')->getList();
|
||||
|
||||
$object = $this->dao->select('*')->from($this->config->objectTables[$objectType])->where('id')->eq($objectID)->fetch();
|
||||
$object = $this->dao->select('*')->from($this->config->objectTables[$objectType])->where('id')->eq($objectID)->fetch();
|
||||
if($objectType == 'auditplan') $object->title = $this->lang->auditplan->common . ' #' . $object->id;
|
||||
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
$host = empty($webhook->domain) ? common::getSysURL() : $webhook->domain;
|
||||
$viewLink = $this->getViewLink($objectType == 'kanbancard' ? 'kanban' : $objectType, $objectType == 'kanbancard' ? $object->kanban : $objectID);
|
||||
|
||||
Reference in New Issue
Block a user