From 11eb4bc6372385bd7f4a07f0e8c2f50763778be4 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 30 Dec 2021 10:27:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=8C=E6=AD=A5=E7=A6=85=E9=81=93?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E6=9C=89=E5=A4=A7=E9=87=8F=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20--bug=3D1009259=20--user=3D=E9=99=88?= =?UTF-8?q?=E5=BB=BA=E6=98=9F=20=E3=80=90=E6=B5=8B=E8=AF=95=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA=E3=80=91=E5=90=8C=E6=AD=A5=E7=A6=85=E9=81=93=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E5=90=8E=EF=BC=8C=E9=A1=B5=E9=9D=A2=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E8=BD=AC=E5=9C=88=EF=BC=8Cmetersphere=E7=96=AF=E7=8B=82?= =?UTF-8?q?=E5=88=B7=E6=97=A5=E5=BF=97=20https://www.tapd.cn/55049933/s/10?= =?UTF-8?q?884722?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/track/issue/ZentaoPlatform.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java b/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java index 361c715c2d..7220d69dec 100644 --- a/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java @@ -162,8 +162,12 @@ public class ZentaoPlatform extends AbstractIssuePlatform { issue.setReporter(bugObj.getOpenedBy()); issue.setPlatform(key); try { - issue.setCreateTime(bug.getLong("openedDate")); - issue.setUpdateTime(bug.getLong("lastEditedDate")); + String openedDate = bug.getString("openedDate"); + String lastEditedDate = bug.getString("lastEditedDate"); + if (StringUtils.isNotBlank(openedDate) && !openedDate.startsWith("0000-00-00")) + issue.setCreateTime(bug.getLong("openedDate")); + if (StringUtils.isNotBlank(lastEditedDate) && !lastEditedDate.startsWith("0000-00-00")) + issue.setUpdateTime(bug.getLong("lastEditedDate")); } catch (Exception e) { LogUtil.error("update zentao time" + e.getMessage()); }