diff --git a/module/action/model.php b/module/action/model.php index 56a2b37b33..85007a59e9 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -73,7 +73,7 @@ class actionModel extends model if($this->post->uid) $this->file->updateObjectID($this->post->uid, $objectID, $objectType); /* Call the message notification function. */ - $this->loadModel('message')->send($objectType, $objectID, $actionType, $actionID, $actor); + $this->loadModel('message')->send(strtolower($objectType), $objectID, $actionType, $actionID, $actor); /* Add index for global search. */ $this->saveIndex($objectType, $objectID, $actionType); diff --git a/module/message/model.php b/module/message/model.php index 98f547130c..1eb12a21fa 100644 --- a/module/message/model.php +++ b/module/message/model.php @@ -146,9 +146,11 @@ class messageModel extends model if($isonlybody) unset($_GET['onlybody']); $moduleName = $objectType == 'case' ? 'testcase' : $objectType; + $moduleName = $objectType == 'kanbancard' ? 'kanban' : $objectType; $space = common::checkNotCN() ? ' ' : ''; $data = $user->realname . $space . $this->lang->action->label->$actionType . $space . $this->lang->action->objectTypes[$objectType]; - $data .= ' ' . html::a($sysURL . helper::createLink($moduleName, 'view', "id=$objectID"), "[#{$objectID}::{$object->$field}]"); + $dataID = $objectType == 'kanbancard' ? $object->kanban : $objectID; + $data .= ' ' . html::a($sysURL . helper::createLink($moduleName, 'view', "id=$dataID"), "[#{$objectID}::{$object->$field}]"); if($isonlybody) $_GET['onlybody'] = 'yes'; diff --git a/module/webhook/model.php b/module/webhook/model.php index c518eacce2..209f021344 100644 --- a/module/webhook/model.php +++ b/module/webhook/model.php @@ -417,7 +417,7 @@ class webhookModel extends model $object = $this->dao->select('*')->from($this->config->objectTables[$objectType])->where('id')->eq($objectID)->fetch(); $field = $this->config->action->objectNameFields[$objectType]; $host = empty($webhook->domain) ? common::getSysURL() : $webhook->domain; - $viewLink = $this->getViewLink($objectType, $objectID); + $viewLink = $this->getViewLink($objectType == 'kanbancard' ? 'kanban' : $objectType, $objectType == 'kanbancard' ? $object->kanban : $objectID); $objectTypeName = ($objectType == 'story' and $object->type == 'requirement') ? $this->lang->action->objectTypes['requirement'] : $this->lang->action->objectTypes[$objectType]; $title = $this->app->user->realname . $this->lang->action->label->$actionType . $objectTypeName; $text = $title . ' ' . "[#{$objectID}::{$object->$field}](" . $host . $viewLink . ")"; diff --git a/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php b/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php index 2d1db5c712..ad3d677375 100644 --- a/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php +++ b/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php @@ -48,12 +48,13 @@ class xuanxuanMessage extends messageModel $server = $this->loadModel('im')->getServer('zentao'); $onlybody = isset($_GET['onlybody']) ? $_GET['onlybody'] : ''; unset($_GET['onlybody']); - $url = $server . helper::createLink($objectType, 'view', "id=$objectID", 'html'); + $dataID = $objectType == 'kanbancard' ? $object->kanban : $objectID; + $url = $server . helper::createLink($objectType == 'kanbancard' ? 'kanban' : $objectType, 'view', "id=$dataID", 'html'); $target = ''; if(!empty($object->assignedTo)) $target .= $object->assignedTo; if(!empty($object->mailto)) $target .= ",{$object->mailto}"; - if($objectType == 'mr' && !empty($object->createdBy)) $target .= ",{$object->createdBy}"; + if(($objectType == 'mr' or $objectType == 'kanbancard') and !empty($object->createdBy)) $target .= ",{$object->createdBy}"; $target = trim($target, ','); $target = $this->dao->select('id')->from(TABLE_USER) ->where('account')->in($target)