fix: 同步禅道缺陷有大量日志报错

--bug=1009259 --user=陈建星 【测试跟踪】同步禅道缺陷后,页面一直转圈,metersphere疯狂刷日志 https://www.tapd.cn/55049933/s/10884722
This commit is contained in:
chenjianxing 2021-12-30 10:27:51 +08:00 committed by fit2-zhao
parent 197ae58215
commit 3b47df0bf7
1 changed files with 6 additions and 2 deletions

View File

@ -162,7 +162,11 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
issue.setReporter(bugObj.getOpenedBy()); issue.setReporter(bugObj.getOpenedBy());
issue.setPlatform(key); issue.setPlatform(key);
try { try {
String openedDate = bug.getString("openedDate");
String lastEditedDate = bug.getString("lastEditedDate");
if (StringUtils.isNotBlank(openedDate) && !openedDate.startsWith("0000-00-00"))
issue.setCreateTime(bug.getLong("openedDate")); issue.setCreateTime(bug.getLong("openedDate"));
if (StringUtils.isNotBlank(lastEditedDate) && !lastEditedDate.startsWith("0000-00-00"))
issue.setUpdateTime(bug.getLong("lastEditedDate")); issue.setUpdateTime(bug.getLong("lastEditedDate"));
} catch (Exception e) { } catch (Exception e) {
LogUtil.error("update zentao time" + e.getMessage()); LogUtil.error("update zentao time" + e.getMessage());