Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
holmes
Commits
fdc7893c
Commit
fdc7893c
authored
Jun 17, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容BUG未分配的情况
parent
80bc7296
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
JiraController.java
...ain/java/cn/qg/holmes/controller/jira/JiraController.java
+5
-1
DingRobotServiceImpl.java
.../cn/qg/holmes/service/jira/impl/DingRobotServiceImpl.java
+6
-1
No files found.
src/main/java/cn/qg/holmes/controller/jira/JiraController.java
View file @
fdc7893c
...
...
@@ -200,7 +200,11 @@ public class JiraController {
map
.
put
(
"key"
,
issue
.
getKey
());
map
.
put
(
"summary"
,
issue
.
getSummary
());
map
.
put
(
"reporter"
,
issue
.
getReporter
().
getDisplayName
());
map
.
put
(
"assignee"
,
issue
.
getAssignee
().
getDisplayName
());
if
(
issue
.
getAssignee
()
!=
null
)
{
map
.
put
(
"assignee"
,
issue
.
getAssignee
().
getDisplayName
());
}
else
{
map
.
put
(
"assignee"
,
"未分配"
);
}
map
.
put
(
"priority"
,
issue
.
getPriority
().
getName
());
map
.
put
(
"status"
,
issue
.
getStatus
().
getName
());
mapList
.
add
(
map
);
...
...
src/main/java/cn/qg/holmes/service/jira/impl/DingRobotServiceImpl.java
View file @
fdc7893c
...
...
@@ -31,7 +31,12 @@ public class DingRobotServiceImpl extends ServiceImpl<DingRobotMapper, DingRobot
String
webhookEvent
=
JsonPath
.
read
(
jiraData
,
"$.webhookEvent"
);
if
(
StringUtils
.
equals
(
webhookEvent
,
"jira:issue_created"
))
{
String
creator
=
JsonPath
.
read
(
jiraData
,
"$.issue.fields.creator.displayName"
);
String
assignee
=
JsonPath
.
read
(
jiraData
,
"$.issue.fields.assignee.displayName"
);
String
assignee
=
""
;
if
(
JsonPath
.
read
(
jiraData
,
"$.issue.fields.assignee"
)
==
null
)
{
assignee
=
"未分配"
;
}
else
{
assignee
=
JsonPath
.
read
(
jiraData
,
"$.issue.fields.assignee.displayName"
);
}
String
key
=
JsonPath
.
read
(
jiraData
,
"$.issue.key"
);
String
summary
=
JsonPath
.
read
(
jiraData
,
"$.issue.fields.summary"
);
String
priority
=
JsonPath
.
read
(
jiraData
,
"$.issue.fields.priority.name"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment