This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 7c19c82af fix: zentao issue url (#5881)
7c19c82af is described below
commit 7c19c82afe3ee844b8934c378fdb42f912789b53
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Aug 15 21:52:18 2023 +0800
fix: zentao issue url (#5881)
* fix: zentao issue url
* fix: e2e test
---
.../zentao/e2e/snapshot_tables/issues_bug.csv | 12 ++--
.../zentao/e2e/snapshot_tables/issues_story.csv | 18 +++---
.../zentao/e2e/snapshot_tables/issues_task.csv | 6 +-
backend/plugins/zentao/tasks/bug_convertor.go | 2 +-
backend/plugins/zentao/tasks/shared.go | 16 ++++-
backend/plugins/zentao/tasks/shared_test.go | 71 ++++++++++++++++++++++
backend/plugins/zentao/tasks/story_convertor.go | 2 +-
backend/plugins/zentao/tasks/task_convertor.go | 2 +-
8 files changed, 106 insertions(+), 23 deletions(-)
diff --git a/backend/plugins/zentao/e2e/snapshot_tables/issues_bug.csv
b/backend/plugins/zentao/e2e/snapshot_tables/issues_bug.csv
index c3df8f609..7540d35ac 100644
--- a/backend/plugins/zentao/e2e/snapshot_tables/issues_bug.csv
+++ b/backend/plugins/zentao/e2e/snapshot_tables/issues_bug.csv
@@ -1,7 +1,7 @@
id,url,icon_url,issue_key,title,description,epic_key,type,original_type,status,original_status,story_point,resolution_date,created_date,updated_date,lead_time_minutes,parent_issue_id,priority,original_estimate_minutes,time_spent_minutes,time_remaining_minutes,creator_id,creator_name,assignee_id,assignee_name,severity,component
-zentao:ZentaoBug:1:1,http://iwater.red:8000/api.php/v1/products/1/bugs?limit=100&page=1,,1,首页页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:56:11.000+00:00,2021-04-28T03:09:08.000+00:00,0,zentao:ZentaoStory:1:1,1,0,0,0,zentao:ZentaoAccount:1:7,测试甲,zentao:ZentaoAccount:1:4,开发甲,,
-zentao:ZentaoBug:1:2,http://iwater.red:8000/api.php/v1/products/1/bugs?limit=100&page=1,,2,新闻中心页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:57:11.000+00:00,2022-10-05T04:19:22.000+00:00,0,zentao:ZentaoStory:1:2,2,0,0,0,zentao:ZentaoAccount:1:7,测试甲,,,,
-zentao:ZentaoBug:1:3,http://iwater.red:8000/api.php/v1/products/1/bugs?limit=100&page=1,,3,成果展示页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:58:22.000+00:00,2021-04-28T03:09:08.000+00:00,0,zentao:ZentaoStory:1:3,1,0,0,0,zentao:ZentaoAccount:1:8,测试乙,zentao:ZentaoAccount:1:4,开发甲,,
-zentao:ZentaoBug:1:4,http://iwater.red:8000/api.php/v1/products/1/bugs?limit=100&page=1,,4,售后服务页面问题,,,CODE_ERROR,bug,resolved,resolved,0,,2012-06-05T03:00:19.000+00:00,2022-10-05T04:10:08.000+00:00,0,zentao:ZentaoStory:1:4,1,0,0,0,zentao:ZentaoAccount:1:9,测试丙,zentao:ZentaoAccount:1:9,测试丙,,
-zentao:ZentaoBug:1:5,http://iwater.red:8000/api.php/v1/products/1/bugs?limit=100&page=1,,5,首页页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:56:11.000+00:00,2021-04-28T03:09:08.000+00:00,0,zentao:ZentaoStory:1:1,1,0,0,0,zentao:ZentaoAccount:1:7,测试甲,zentao:ZentaoAccount:1:4,开发甲,,
-zentao:ZentaoBug:1:6,http://iwater.red:8000/api.php/v1/products/1/bugs?limit=100&page=1,,6,新闻中心页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:57:11.000+00:00,2022-10-05T04:19:22.000+00:00,0,zentao:ZentaoStory:1:2,2,0,0,0,zentao:ZentaoAccount:1:7,测试甲,,,,
+zentao:ZentaoBug:1:1,http://iwater.red:8000/bug-view-1.html,,1,首页页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:56:11.000+00:00,2021-04-28T03:09:08.000+00:00,0,zentao:ZentaoStory:1:1,1,0,0,0,zentao:ZentaoAccount:1:7,测试甲,zentao:ZentaoAccount:1:4,开发甲,,
+zentao:ZentaoBug:1:2,http://iwater.red:8000/bug-view-2.html,,2,新闻中心页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:57:11.000+00:00,2022-10-05T04:19:22.000+00:00,0,zentao:ZentaoStory:1:2,2,0,0,0,zentao:ZentaoAccount:1:7,测试甲,,,,
+zentao:ZentaoBug:1:3,http://iwater.red:8000/bug-view-3.html,,3,成果展示页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:58:22.000+00:00,2021-04-28T03:09:08.000+00:00,0,zentao:ZentaoStory:1:3,1,0,0,0,zentao:ZentaoAccount:1:8,测试乙,zentao:ZentaoAccount:1:4,开发甲,,
+zentao:ZentaoBug:1:4,http://iwater.red:8000/bug-view-4.html,,4,售后服务页面问题,,,CODE_ERROR,bug,resolved,resolved,0,,2012-06-05T03:00:19.000+00:00,2022-10-05T04:10:08.000+00:00,0,zentao:ZentaoStory:1:4,1,0,0,0,zentao:ZentaoAccount:1:9,测试丙,zentao:ZentaoAccount:1:9,测试丙,,
+zentao:ZentaoBug:1:5,http://iwater.red:8000/bug-view-5.html,,5,首页页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:56:11.000+00:00,2021-04-28T03:09:08.000+00:00,0,zentao:ZentaoStory:1:1,1,0,0,0,zentao:ZentaoAccount:1:7,测试甲,zentao:ZentaoAccount:1:4,开发甲,,
+zentao:ZentaoBug:1:6,http://iwater.red:8000/bug-view-6.html,,6,新闻中心页面问题,,,CODE_ERROR,bug,DONE,active,0,,2012-06-05T02:57:11.000+00:00,2022-10-05T04:19:22.000+00:00,0,zentao:ZentaoStory:1:2,2,0,0,0,zentao:ZentaoAccount:1:7,测试甲,,,,
diff --git a/backend/plugins/zentao/e2e/snapshot_tables/issues_story.csv
b/backend/plugins/zentao/e2e/snapshot_tables/issues_story.csv
index b47f41514..e3c109929 100644
--- a/backend/plugins/zentao/e2e/snapshot_tables/issues_story.csv
+++ b/backend/plugins/zentao/e2e/snapshot_tables/issues_story.csv
@@ -1,10 +1,10 @@
id,url,icon_url,issue_key,title,description,epic_key,type,original_type,status,original_status,story_point,resolution_date,created_date,updated_date,lead_time_minutes,parent_issue_id,priority,original_estimate_minutes,time_spent_minutes,time_remaining_minutes,creator_id,creator_name,assignee_id,assignee_name,severity,component
-zentao:ZentaoStory:1:1,http://iwater.red:8000/api.php/v1/products/1/stories?limit=100&page=1,,1,首页设计和开发,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:09:49.000+00:00,2012-06-05T02:25:19.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
-zentao:ZentaoStory:1:2,http://iwater.red:8000/api.php/v1/products/1/stories?limit=100&page=1,,2,新闻中心的设计和开发。,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:16:37.000+00:00,2012-06-05T02:25:33.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
-zentao:ZentaoStory:1:3,http://iwater.red:8000/api.php/v1/products/1/stories?limit=100&page=1,,3,成果展示的设计和开发,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:18:10.000+00:00,2012-06-05T02:25:38.000+00:00,0,,1,0,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
-zentao:ZentaoStory:1:4,http://iwater.red:8000/api.php/v1/products/1/stories?limit=100&page=1,,4,售后服务的设计和开发,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:20:16.000+00:00,2012-06-05T02:25:42.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
-zentao:ZentaoStory:1:5,http://iwater.red:8000/api.php/v1/products/1/stories?limit=100&page=1,,5,诚聘英才的设计和开发,,,REQUIREMENT,story,reviewing,reviewing,0,,2012-06-05T02:21:39.000+00:00,,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
-zentao:ZentaoStory:1:6,http://iwater.red:8000/api.php/v1/products/1/stories?limit=100&page=1,,6,合作洽谈的设计和开发,,,REQUIREMENT,story,reviewing,reviewing,0,,2012-06-05T02:23:11.000+00:00,,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
-zentao:ZentaoStory:1:7,http://iwater.red:8000/api.php/v1/products/1/stories?limit=100&page=1,,7,关于我们的设计和开发,,,REQUIREMENT,story,reviewing,reviewing,0,,2012-06-05T02:24:19.000+00:00,,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
-zentao:ZentaoStory:1:8,http://iwater.red:8000/api.php/v1/products/1/stories?limit=100&page=1,,8,新闻中心的设计和开发。,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:16:37.000+00:00,2012-06-05T02:25:33.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
-zentao:ZentaoStory:1:9,http://iwater.red:8000/api.php/v1/products/1/stories?limit=100&page=1,,9,首页设计和开发,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:09:49.000+00:00,2012-06-05T02:25:19.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
+zentao:ZentaoStory:1:1,http://iwater.red:8000/story-view-1.html,,1,首页设计和开发,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:09:49.000+00:00,2012-06-05T02:25:19.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
+zentao:ZentaoStory:1:2,http://iwater.red:8000/story-view-2.html,,2,新闻中心的设计和开发。,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:16:37.000+00:00,2012-06-05T02:25:33.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
+zentao:ZentaoStory:1:3,http://iwater.red:8000/story-view-3.html,,3,成果展示的设计和开发,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:18:10.000+00:00,2012-06-05T02:25:38.000+00:00,0,,1,0,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
+zentao:ZentaoStory:1:4,http://iwater.red:8000/story-view-4.html,,4,售后服务的设计和开发,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:20:16.000+00:00,2012-06-05T02:25:42.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
+zentao:ZentaoStory:1:5,http://iwater.red:8000/story-view-5.html,,5,诚聘英才的设计和开发,,,REQUIREMENT,story,reviewing,reviewing,0,,2012-06-05T02:21:39.000+00:00,,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
+zentao:ZentaoStory:1:6,http://iwater.red:8000/story-view-6.html,,6,合作洽谈的设计和开发,,,REQUIREMENT,story,reviewing,reviewing,0,,2012-06-05T02:23:11.000+00:00,,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
+zentao:ZentaoStory:1:7,http://iwater.red:8000/story-view-7.html,,7,关于我们的设计和开发,,,REQUIREMENT,story,reviewing,reviewing,0,,2012-06-05T02:24:19.000+00:00,,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
+zentao:ZentaoStory:1:8,http://iwater.red:8000/story-view-8.html,,8,新闻中心的设计和开发。,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:16:37.000+00:00,2012-06-05T02:25:33.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
+zentao:ZentaoStory:1:9,http://iwater.red:8000/story-view-9.html,,9,首页设计和开发,,,REQUIREMENT,story,DONE,active,0,,2012-06-05T02:09:49.000+00:00,2012-06-05T02:25:19.000+00:00,0,,1,60,0,0,zentao:ZentaoAccount:1:2,产品经理,zentao:ZentaoAccount:1:2,产品经理,,
diff --git a/backend/plugins/zentao/e2e/snapshot_tables/issues_task.csv
b/backend/plugins/zentao/e2e/snapshot_tables/issues_task.csv
index 8ac7954a8..42769c4ed 100644
--- a/backend/plugins/zentao/e2e/snapshot_tables/issues_task.csv
+++ b/backend/plugins/zentao/e2e/snapshot_tables/issues_task.csv
@@ -1,4 +1,4 @@
id,url,icon_url,issue_key,title,description,epic_key,type,original_type,status,original_status,story_point,resolution_date,created_date,updated_date,lead_time_minutes,parent_issue_id,priority,original_estimate_minutes,time_spent_minutes,time_remaining_minutes,creator_id,creator_name,assignee_id,assignee_name,severity,component
-zentao:ZentaoTask:1:1,http://iwater.red:8000/api.php/v1/executions/9/tasks?limit=100&page=1,,1,任务名称,任务描述<span>
</span><br /><div><br
/></div>,,TASK_DEV,task,IN_PROGRESS,wait,0,,2022-09-19T01:50:37.000+00:00,,0,,3,0,0,0,zentao:ZentaoAccount:1:1,devlake,zentao:ZentaoAccount:1:5,开发乙,,
-zentao:ZentaoTask:1:2,http://iwater.red:8000/api.php/v1/executions/4/tasks?limit=100&page=1,,2,任务名称,任务描述<span>
</span><br /><div><br
/></div>,,TASK_DEV,task,IN_PROGRESS,wait,0,,2022-09-19T01:50:37.000+00:00,,0,,3,720,120,600,zentao:ZentaoAccount:1:1,devlake,zentao:ZentaoAccount:1:5,开发乙,,
-zentao:ZentaoTask:1:3,http://iwater.red:8000/api.php/v1/executions/3/tasks?limit=100&page=1,,3,任务名称,任务描述<span>
</span><br /><div><br
/></div>,,TASK_DEV,task,IN_PROGRESS,wait,0,,2022-09-19T01:50:37.000+00:00,,0,zentao:ZentaoStory:1:-1,3,660,0,660,zentao:ZentaoAccount:1:1,devlake,zentao:ZentaoAccount:1:5,开发乙,,
+zentao:ZentaoTask:1:1,http://iwater.red:8000/task-view-1.html,,1,任务名称,任务描述<span>
</span><br /><div><br
/></div>,,TASK_DEV,task,IN_PROGRESS,wait,0,,2022-09-19T01:50:37.000+00:00,,0,,3,0,0,0,zentao:ZentaoAccount:1:1,devlake,zentao:ZentaoAccount:1:5,开发乙,,
+zentao:ZentaoTask:1:2,http://iwater.red:8000/task-view-2.html,,2,任务名称,任务描述<span>
</span><br /><div><br
/></div>,,TASK_DEV,task,IN_PROGRESS,wait,0,,2022-09-19T01:50:37.000+00:00,,0,,3,720,120,600,zentao:ZentaoAccount:1:1,devlake,zentao:ZentaoAccount:1:5,开发乙,,
+zentao:ZentaoTask:1:3,http://iwater.red:8000/task-view-3.html,,3,任务名称,任务描述<span>
</span><br /><div><br
/></div>,,TASK_DEV,task,IN_PROGRESS,wait,0,,2022-09-19T01:50:37.000+00:00,,0,zentao:ZentaoStory:1:-1,3,660,0,660,zentao:ZentaoAccount:1:1,devlake,zentao:ZentaoAccount:1:5,开发乙,,
diff --git a/backend/plugins/zentao/tasks/bug_convertor.go
b/backend/plugins/zentao/tasks/bug_convertor.go
index 540903154..eca844a85 100644
--- a/backend/plugins/zentao/tasks/bug_convertor.go
+++ b/backend/plugins/zentao/tasks/bug_convertor.go
@@ -88,7 +88,7 @@ func ConvertBug(taskCtx plugin.SubTaskContext) errors.Error {
CreatorName: toolEntity.OpenedByName,
AssigneeName: toolEntity.AssignedToName,
Severity:
string(rune(toolEntity.Severity)),
- Url: toolEntity.Url,
+ Url:
convertIssueURL(toolEntity.Url, "bug", toolEntity.ID),
OriginalProject: getOriginalProject(data),
Status: toolEntity.StdStatus,
}
diff --git a/backend/plugins/zentao/tasks/shared.go
b/backend/plugins/zentao/tasks/shared.go
index 08e127d7a..c4fd10d49 100644
--- a/backend/plugins/zentao/tasks/shared.go
+++ b/backend/plugins/zentao/tasks/shared.go
@@ -19,14 +19,15 @@ package tasks
import (
"fmt"
- "github.com/apache/incubator-devlake/core/dal"
- "github.com/apache/incubator-devlake/core/plugin"
"net/http"
"net/url"
+ "path"
"reflect"
"strings"
+ "github.com/apache/incubator-devlake/core/dal"
"github.com/apache/incubator-devlake/core/errors"
+ "github.com/apache/incubator-devlake/core/plugin"
"github.com/apache/incubator-devlake/helpers/pluginhelper/api"
"github.com/apache/incubator-devlake/plugins/zentao/models"
)
@@ -293,3 +294,14 @@ func (a *AccountCache)
getAccountNameFromApiAccount(account *models.ApiAccount)
}
return a.getAccountName(account.Account)
}
+
+func convertIssueURL(apiURL, issueType string, id int64) string {
+ u, err := url.Parse(apiURL)
+ if err != nil {
+ return apiURL
+ }
+ before, _, _ := strings.Cut(u.Path, "/api.php/v1")
+ u.RawQuery = ""
+ u.Path = path.Join(before, fmt.Sprintf("/%s-view-%d.html", issueType,
id))
+ return u.String()
+}
diff --git a/backend/plugins/zentao/tasks/shared_test.go
b/backend/plugins/zentao/tasks/shared_test.go
new file mode 100644
index 000000000..bd9aacc85
--- /dev/null
+++ b/backend/plugins/zentao/tasks/shared_test.go
@@ -0,0 +1,71 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package tasks
+
+import "testing"
+
+func Test_convertIssueURL(t *testing.T) {
+ type args struct {
+ apiURL string
+ issueType string
+ id int64
+ }
+ tests := []struct {
+ name string
+ args args
+ want string
+ }{
+ {
+ "bug",
+
args{"http://example.com/api.php/v1/products/16/bugs?limit=100&page=1", "bug",
1169},
+ "http://example.com/bug-view-1169.html",
+ },
+ {
+ "bug with prefix",
+
args{"http://example.com/prefix1/prefix2/api.php/v1/products/16/bugs?limit=100&page=1",
"bug", 1169},
+ "http://example.com/prefix1/prefix2/bug-view-1169.html",
+ },
+ {
+ "story",
+
args{"http://example.com/api.php/v1/executions/41/stories?limit=100&page=1&status=allstory",
"story", 4513},
+ "http://example.com/story-view-4513.html",
+ },
+ {
+ "story with prefix",
+
args{"http://example.com/prefix1/prefix2/api.php/v1/executions/41/stories?limit=100&page=1&status=allstory",
"story", 4513},
+
"http://example.com/prefix1/prefix2/story-view-4513.html",
+ },
+ {
+ "task",
+
args{"http://example.com/api.php/v1/executions/39/tasks?limit=100&page=1",
"task", 2381},
+ "http://example.com/task-view-2381.html",
+ },
+ {
+ "task with prefix",
+
args{"http://example.com/prefix1/prefix2/api.php/v1/executions/41/stories?limit=100&page=1&status=allstory",
"task", 2381},
+
"http://example.com/prefix1/prefix2/task-view-2381.html",
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ if got := convertIssueURL(tt.args.apiURL,
tt.args.issueType, tt.args.id); got != tt.want {
+ t.Errorf("convertIssueURL() = %v, want %v",
got, tt.want)
+ }
+ })
+ }
+}
diff --git a/backend/plugins/zentao/tasks/story_convertor.go
b/backend/plugins/zentao/tasks/story_convertor.go
index cf66a49a7..c6a12bdf6 100644
--- a/backend/plugins/zentao/tasks/story_convertor.go
+++ b/backend/plugins/zentao/tasks/story_convertor.go
@@ -86,7 +86,7 @@ func ConvertStory(taskCtx plugin.SubTaskContext) errors.Error
{
Priority:
getPriority(toolEntity.Pri),
CreatorName:
toolEntity.OpenedByName,
AssigneeName:
toolEntity.AssignedToName,
- Url: toolEntity.Url,
+ Url:
convertIssueURL(toolEntity.Url, "story", toolEntity.ID),
OriginalProject:
getOriginalProject(data),
Status: toolEntity.StdStatus,
OriginalEstimateMinutes:
int64(toolEntity.Estimate) * 60,
diff --git a/backend/plugins/zentao/tasks/task_convertor.go
b/backend/plugins/zentao/tasks/task_convertor.go
index d671abdba..d49cfe153 100644
--- a/backend/plugins/zentao/tasks/task_convertor.go
+++ b/backend/plugins/zentao/tasks/task_convertor.go
@@ -85,7 +85,7 @@ func ConvertTask(taskCtx plugin.SubTaskContext) errors.Error {
Priority:
getPriority(toolEntity.Pri),
CreatorName:
toolEntity.OpenedByName,
AssigneeName:
toolEntity.AssignedToName,
- Url: toolEntity.Url,
+ Url:
convertIssueURL(toolEntity.Url, "task", toolEntity.ID),
OriginalProject:
getOriginalProject(data),
Status: toolEntity.StdStatus,
OriginalEstimateMinutes:
int64(toolEntity.Estimate) * 60,