Commit 12205123 authored by 黎博's avatar 黎博

研发工单title更明确

parent a193d01e
...@@ -69,7 +69,7 @@ public class WebhookServiceImpl implements WebhookService { ...@@ -69,7 +69,7 @@ public class WebhookServiceImpl implements WebhookService {
} }
// BUG创建的时候发送通知 // BUG创建的时候发送通知
if (StringUtils.equals(webhookEvent, "jira:issue_created")) { if (StringUtils.equals(webhookEvent, "jira:issue_created")) {
String title = "线上研发工单提交"; String title = "线上研发工单" + key + "提交";
String content = "📣" + creator + "提交了线上研发工单:" + key + "\n\n"; String content = "📣" + creator + "提交了线上研发工单:" + key + "\n\n";
content += "概要:[" + summary + "](" + "http://jira2.quantgroup.cn/browse/" + key + ")" + "\n\n" content += "概要:[" + summary + "](" + "http://jira2.quantgroup.cn/browse/" + key + ")" + "\n\n"
+ "- 优先级:" + priority + "\n" + "- 优先级:" + priority + "\n"
...@@ -98,6 +98,7 @@ public class WebhookServiceImpl implements WebhookService { ...@@ -98,6 +98,7 @@ public class WebhookServiceImpl implements WebhookService {
switch (eventTypeName) { switch (eventTypeName) {
case "issue_work_started": case "issue_work_started":
// BUG状态变为【处理中】 // BUG状态变为【处理中】
title = "研发工单" + key + "更新";
content += "📣研发工单 " + key + " 状态更新:" + "\n\n"; content += "📣研发工单 " + key + " 状态更新:" + "\n\n";
content += "概要:[" + summary + "](" + issueUrl + ")"+ "\n\n"; content += "概要:[" + summary + "](" + issueUrl + ")"+ "\n\n";
content += "状态变更为:【处理中】\n\n"; content += "状态变更为:【处理中】\n\n";
...@@ -105,6 +106,7 @@ public class WebhookServiceImpl implements WebhookService { ...@@ -105,6 +106,7 @@ public class WebhookServiceImpl implements WebhookService {
break; break;
case "issue_resolved": case "issue_resolved":
// BUG状态变为【已解决】 // BUG状态变为【已解决】
title = "研发工单" + key + "更新";
content += "📣研发工单 " + key + " 状态更新:" + "\n\n"; content += "📣研发工单 " + key + " 状态更新:" + "\n\n";
content += "概要:[" + summary + "](" + issueUrl + ")"+ "\n\n"; content += "概要:[" + summary + "](" + issueUrl + ")"+ "\n\n";
content += "状态变更为:【已解决】\n\n"; content += "状态变更为:【已解决】\n\n";
...@@ -114,6 +116,7 @@ public class WebhookServiceImpl implements WebhookService { ...@@ -114,6 +116,7 @@ public class WebhookServiceImpl implements WebhookService {
break; break;
case "issue_reopened": case "issue_reopened":
// BUG状态变为【重新打开】 // BUG状态变为【重新打开】
title = "研发工单" + key + "更新";
content += "📣研发工单 " + key + " 状态更新:" + "\n\n"; content += "📣研发工单 " + key + " 状态更新:" + "\n\n";
content += "概要:[" + summary + "](" + issueUrl + ")"+ "\n\n"; content += "概要:[" + summary + "](" + issueUrl + ")"+ "\n\n";
content += "状态变更为:【重新打开】\n\n"; content += "状态变更为:【重新打开】\n\n";
...@@ -126,6 +129,7 @@ public class WebhookServiceImpl implements WebhookService { ...@@ -126,6 +129,7 @@ public class WebhookServiceImpl implements WebhookService {
break; break;
case "issue_commented": case "issue_commented":
// 新增BUG备注 // 新增BUG备注
title = "研发工单" + key + "更新";
content += "📣研发工单 " + key + " 新增备注:" + "\n\n"; content += "📣研发工单 " + key + " 新增备注:" + "\n\n";
content += "概要:[" + summary + "](" + issueUrl + ")"+ "\n\n"; content += "概要:[" + summary + "](" + issueUrl + ")"+ "\n\n";
String commentBody = JsonPath.read(jiraData, "$.comment.body"); String commentBody = JsonPath.read(jiraData, "$.comment.body");
...@@ -140,6 +144,7 @@ public class WebhookServiceImpl implements WebhookService { ...@@ -140,6 +144,7 @@ public class WebhookServiceImpl implements WebhookService {
break; break;
case "issue_updated": case "issue_updated":
// BUG更新 // BUG更新
title = "研发工单" + key + "更新";
String changedField = JsonPath.read(jiraData, "$.changelog.items[0].field"); String changedField = JsonPath.read(jiraData, "$.changelog.items[0].field");
if (StringUtils.equals(changedField, "assignee")) { if (StringUtils.equals(changedField, "assignee")) {
content += "📣研发工单 " + key + " 经办人变更:" + "\n\n"; content += "📣研发工单 " + key + " 经办人变更:" + "\n\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment