Commit a773c977 authored by 黎博's avatar 黎博

修改bug池循环的结束时间

parent cbe4a1e7
......@@ -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.getUpdateDate();
endDate = new DateTime();
}
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);
......
......@@ -91,7 +91,7 @@ public class JiraIssueServiceImpl implements JiraIssueService {
int startHour = startDate.getHourOfDay();
int endHour = endDate.getHourOfDay();
int startMinute = startDate.getMinuteOfHour();
int endMinute = endDate.getSecondOfMinute();
int endMinute = endDate.getMinuteOfHour();
int startSecond = startDate.getSecondOfMinute();
int endSecond = endDate.getSecondOfMinute();
boolean daySubFlag = true;
......
......@@ -72,8 +72,8 @@ public class JiraToDingding {
jiraBugPoolService.saveOrUpdate(jiraBugPool);
} else {
DateTime startDate = issue.getCreationDate();
DateTime endDate = issue.getUpdateDate();
int duration = jiraIssueService.calculateBugFixTime(startDate, endDate);
DateTime curDate = new DateTime();
int duration = jiraIssueService.calculateBugFixTime(startDate, curDate);
log.info("{} BUG持续时间:{}小时", issue.getKey(), duration);
// DingdingUtils.sendToDingding(DingdingUtils.buildBugFixRemindMsg(issue), jiraBugPool.getDingUrl());
// 如果已超过4个小时,则发送钉钉通知
......
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