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
a773c977
Commit
a773c977
authored
May 25, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug池循环的结束时间
parent
cbe4a1e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
JiraController.java
...ain/java/cn/qg/holmes/controller/jira/JiraController.java
+2
-5
JiraIssueServiceImpl.java
.../cn/qg/holmes/service/jira/impl/JiraIssueServiceImpl.java
+1
-1
JiraToDingding.java
src/main/java/cn/qg/holmes/task/jira/JiraToDingding.java
+2
-2
No files found.
src/main/java/cn/qg/holmes/controller/jira/JiraController.java
View file @
a773c977
...
...
@@ -86,17 +86,14 @@ public class JiraController {
DateTime
endDate
;
// 如果已解决或已关闭,仅修改状态
if
(
resolveResult
.
equals
(
"已解决"
)
||
resolveResult
.
equals
(
"关闭"
))
{
// jiraBugPool.setEnable(0);
// 更新状态
// jiraBugPoolService.saveOrUpdate(jiraBugPool);
endDate
=
DateTime
.
parse
(
issue
.
getFieldByName
(
"已解决"
).
getValue
().
toString
());
}
else
{
endDate
=
issue
.
getUpdateDat
e
();
endDate
=
new
DateTim
e
();
}
int
duration
=
jiraIssueService
.
calculateBugFixTime
(
startDate
,
endDate
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"title"
,
issue
.
getSummary
());
map
.
put
(
"
解决
时长"
,
duration
);
map
.
put
(
"
持续
时长"
,
duration
);
mapList
.
add
(
map
);
}
return
JsonResult
.
buildSuccessResult
(
mapList
);
...
...
src/main/java/cn/qg/holmes/service/jira/impl/JiraIssueServiceImpl.java
View file @
a773c977
...
...
@@ -91,7 +91,7 @@ public class JiraIssueServiceImpl implements JiraIssueService {
int
startHour
=
startDate
.
getHourOfDay
();
int
endHour
=
endDate
.
getHourOfDay
();
int
startMinute
=
startDate
.
getMinuteOfHour
();
int
endMinute
=
endDate
.
get
SecondOfMinute
();
int
endMinute
=
endDate
.
get
MinuteOfHour
();
int
startSecond
=
startDate
.
getSecondOfMinute
();
int
endSecond
=
endDate
.
getSecondOfMinute
();
boolean
daySubFlag
=
true
;
...
...
src/main/java/cn/qg/holmes/task/jira/JiraToDingding.java
View file @
a773c977
...
...
@@ -72,8 +72,8 @@ public class JiraToDingding {
jiraBugPoolService
.
saveOrUpdate
(
jiraBugPool
);
}
else
{
DateTime
startDate
=
issue
.
getCreationDate
();
DateTime
endDate
=
issue
.
getUpdateDat
e
();
int
duration
=
jiraIssueService
.
calculateBugFixTime
(
startDate
,
end
Date
);
DateTime
curDate
=
new
DateTim
e
();
int
duration
=
jiraIssueService
.
calculateBugFixTime
(
startDate
,
cur
Date
);
log
.
info
(
"{} BUG持续时间:{}小时"
,
issue
.
getKey
(),
duration
);
// DingdingUtils.sendToDingding(DingdingUtils.buildBugFixRemindMsg(issue), jiraBugPool.getDingUrl());
// 如果已超过4个小时,则发送钉钉通知
...
...
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