Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
10b258a9
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 3 年多
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
10b258a9
编写于
10月 23, 2020
作者:
W
wenyann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(消息设置):消息设置修改
上级
f64d7a21
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
33 addition
and
23 deletion
+33
-23
backend/src/main/java/io/metersphere/notice/service/MailService.java
.../main/java/io/metersphere/notice/service/MailService.java
+4
-2
backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java
...a/io/metersphere/track/service/TestCaseReviewService.java
+1
-1
frontend/src/business/components/settings/organization/TaskNotification.vue
...ess/components/settings/organization/TaskNotification.vue
+12
-8
frontend/src/i18n/en-US.js
frontend/src/i18n/en-US.js
+2
-1
frontend/src/i18n/zh-CN.js
frontend/src/i18n/zh-CN.js
+2
-1
frontend/src/i18n/zh-TW.js
frontend/src/i18n/zh-TW.js
+12
-10
未找到文件。
backend/src/main/java/io/metersphere/notice/service/MailService.java
浏览文件 @
10b258a9
...
...
@@ -168,11 +168,11 @@ public class MailService {
}
}
/*新建评审*/
public
void
sendReviewerNotice
(
MessageDetail
messageDetail
,
List
<
String
>
userIds
,
SaveTestCaseReviewRequest
reviewRequest
,
String
eventType
)
{
Map
<
String
,
String
>
context
=
getReviewContext
(
reviewRequest
);
try
{
String
reviewerTemplate
=
IOUtils
.
toString
(
this
.
getClass
().
getResource
(
"/mail/
end
.html"
),
StandardCharsets
.
UTF_8
);
String
reviewerTemplate
=
IOUtils
.
toString
(
this
.
getClass
().
getResource
(
"/mail/
reviewer
.html"
),
StandardCharsets
.
UTF_8
);
sendReviewNotice
(
addresseeIdList
(
messageDetail
,
userIds
,
eventType
),
context
,
reviewerTemplate
);
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
e
);
...
...
@@ -385,6 +385,8 @@ public class MailService {
for
(
String
k
:
context
.
keySet
())
{
if
(
StringUtils
.
isNotBlank
(
context
.
get
(
k
)))
{
template
=
RegExUtils
.
replaceAll
(
template
,
"\\$\\{"
+
k
+
"}"
,
context
.
get
(
k
));
}
else
{
template
=
RegExUtils
.
replaceAll
(
template
,
"\\$\\{"
+
k
+
"}"
,
""
);
}
}
}
...
...
backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java
浏览文件 @
10b258a9
...
...
@@ -459,7 +459,7 @@ public class TestCaseReviewService {
wxChatTaskService
.
sendWechatRobot
(
r
,
userIds
,
context
,
NoticeConstants
.
UPDATE
);
break
;
case
NoticeConstants
.
EMAIL
:
mailService
.
send
Reviewer
Notice
(
r
,
userIds
,
testCaseReviewRequest
,
NoticeConstants
.
UPDATE
);
mailService
.
send
End
Notice
(
r
,
userIds
,
testCaseReviewRequest
,
NoticeConstants
.
UPDATE
);
break
;
}
});
...
...
frontend/src/business/components/settings/organization/TaskNotification.vue
浏览文件 @
10b258a9
...
...
@@ -568,14 +568,18 @@ export default {
handleAddTask
(
index
,
data
)
{
let
list
=
[]
if
(
data
.
event
&&
data
.
userIds
.
length
>
0
&&
data
.
type
)
{
data
.
isSet
=
false
list
.
push
(
data
)
let
param
=
{};
param
.
messageDetail
=
list
this
.
result
=
this
.
$post
(
"
/notice/save/message/task
"
,
param
,
()
=>
{
this
.
initForm
()
this
.
$success
(
this
.
$t
(
'
commons.save_success
'
));
})
if
(
data
.
type
===
'
NAIL_ROBOT
'
||
data
.
type
===
'
NAIL_ROBOT
'
)
{
this
.
$warning
(
this
.
$t
(
'
organization.message.message_webhook
'
));
}
else
{
data
.
isSet
=
false
list
.
push
(
data
)
let
param
=
{};
param
.
messageDetail
=
list
this
.
result
=
this
.
$post
(
"
/notice/save/message/task
"
,
param
,
()
=>
{
this
.
initForm
()
this
.
$success
(
this
.
$t
(
'
commons.save_success
'
));
})
}
}
else
{
this
.
$warning
(
this
.
$t
(
'
organization.message.message
'
));
}
...
...
frontend/src/i18n/en-US.js
浏览文件 @
10b258a9
...
...
@@ -234,7 +234,8 @@ export default {
'
\n
'
+
'
3. Robots are selected as swarm robots, and "custom keyword" is selected for security verification: "task notification"
'
,
message
:
'
Event, receiver and receiving method are required
\n
'
+
'
\n
'
'
\n
'
,
message_webhook
:
'
Webhook is required when the receiving mode is nail or enterprise robot
'
},
integration
:
{
select_defect_platform
:
'
Please select the defect management platform to be integrated:
'
,
...
...
frontend/src/i18n/zh-CN.js
浏览文件 @
10b258a9
...
...
@@ -232,7 +232,8 @@ export default {
notes
:
'
注意: 1.事件,接收方式,接收人为必填项;
\n
'
+
'
2.接收方式除邮件外webhook为必填;
\n
'
+
'
3.机器人选择为群机器人,安全验证选择“自定义关键词” :"任务通知"
'
,
message
:
'
事件,接收人,接收方式为必填项
'
message
:
'
事件,接收人,接收方式为必填项
'
,
message_webhook
:
'
接收方式为钉钉和企业机器人时,webhook为必填项
'
},
...
...
frontend/src/i18n/zh-TW.js
浏览文件 @
10b258a9
...
...
@@ -219,16 +219,18 @@ export default {
defect_manage
:
'
缺陷管理平臺
'
,
message_settings
:
'
消息設定
'
,
message
:{
jenkins_task_notification
:
'
Jenkins任務通知
'
,
test_plan_task_notification
:
'
測試計畫任務通知
'
,
test_review_task_notice
:
'
測試評審任務通知
'
,
defect_task_notification
:
'
缺陷任務通知
'
,
create_new_notification
:
'
創建新通知
'
,
select_events
:
'
選擇事件
'
,
select_receiving_method
:
'
選擇接收管道
'
,
mail
:
'
郵件
'
,
nail_robot
:
'
釘釘機器人
'
,
enterprise_wechat_robot
:
'
企業微信機器人
'
,
jenkins_task_notification
:
'
Jenkins任務通知
'
,
test_plan_task_notification
:
'
測試計畫任務通知
'
,
test_review_task_notice
:
'
測試評審任務通知
'
,
defect_task_notification
:
'
缺陷任務通知
'
,
create_new_notification
:
'
創建新通知
'
,
select_events
:
'
選擇事件
'
,
select_receiving_method
:
'
選擇接收管道
'
,
mail
:
'
郵件
'
,
nail_robot
:
'
釘釘機器人
'
,
enterprise_wechat_robot
:
'
企業微信機器人
'
,
message_webhook
:
'
接收管道為釘釘和企業機器人時,webhook為必填項
\n
'
+
'
\n
'
},
integration
:
{
select_defect_platform
:
'
請選擇要集成的缺陷管理平臺:
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录