From 3ca8b453ccbdfc95915018fcd50720ee03580126 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 18 Dec 2025 07:56:12 +0000 Subject: [PATCH] * [task#154463,doing,0.5h] modify mail title. --- module/mail/tao.php | 2 ++ module/message/model.php | 1 + module/webhook/model.php | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/module/mail/tao.php b/module/mail/tao.php index 7ba02ea555..584c96ae9e 100644 --- a/module/mail/tao.php +++ b/module/mail/tao.php @@ -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, ''); } diff --git a/module/message/model.php b/module/message/model.php index f7683365e7..849f9bbe00 100755 --- a/module/message/model.php +++ b/module/message/model.php @@ -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; diff --git a/module/webhook/model.php b/module/webhook/model.php index 78925c39cf..86f58df0a2 100644 --- a/module/webhook/model.php +++ b/module/webhook/model.php @@ -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);