You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by li...@apache.org on 2023/03/03 07:19:38 UTC

[incubator-devlake] branch main updated: fix: fix zentao cannot run in pg; add min version tips (#4579)

This is an automated email from the ASF dual-hosted git repository.

likyh 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 b8ede15f5 fix: fix zentao cannot run in pg; add min version tips (#4579)
b8ede15f5 is described below

commit b8ede15f500a917e489a6c4c96b4bcab4b7c219c
Author: Likyh <ya...@meri.co>
AuthorDate: Fri Mar 3 15:19:32 2023 +0800

    fix: fix zentao cannot run in pg; add min version tips (#4579)
---
 backend/plugins/zentao/models/archived/department.go                   | 2 +-
 backend/plugins/zentao/models/department.go                            | 2 +-
 .../plugins/zentao/models/migrationscripts/20221121_add_init_tables.go | 3 ++-
 config-ui/src/plugins/register/zentao/config.ts                        | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/backend/plugins/zentao/models/archived/department.go b/backend/plugins/zentao/models/archived/department.go
index cc41553cd..fd23dd8e4 100644
--- a/backend/plugins/zentao/models/archived/department.go
+++ b/backend/plugins/zentao/models/archived/department.go
@@ -25,7 +25,7 @@ type ZentaoDepartment struct {
 	ConnectionId uint64 `gorm:"primaryKey;type:BIGINT  NOT NULL"`
 	ID           int64  `json:"id" gorm:"primaryKey;type:BIGINT  NOT NULL" `
 	Name         string `json:"name" gorm:"type:varchar(100);index"`
-	Parent       int    `json:"parent" gorm:"type:varchar(100)"`
+	Parent       int    `json:"parent" gorm:"type:BIGINT  NOT NULL"`
 	Path         string `json:"path" gorm:"type:varchar(100)"`
 	Grade        int    `json:"grade"`
 	OrderIn      int    `json:"order"`
diff --git a/backend/plugins/zentao/models/department.go b/backend/plugins/zentao/models/department.go
index 17d33d38f..0c52a655e 100644
--- a/backend/plugins/zentao/models/department.go
+++ b/backend/plugins/zentao/models/department.go
@@ -25,7 +25,7 @@ type ZentaoDepartment struct {
 	ConnectionId uint64 `gorm:"primaryKey;type:BIGINT  NOT NULL"`
 	ID           int64  `json:"id" gorm:"primaryKey;type:BIGINT  NOT NULL" `
 	Name         string `json:"name" gorm:"type:varchar(100);index"`
-	Parent       int64  `json:"parent" gorm:"type:varchar(100)"`
+	Parent       int64  `json:"parent" gorm:"type:BIGINT  NOT NULL"`
 	Path         string `json:"path" gorm:"type:varchar(100)"`
 	Grade        int    `json:"grade"`
 	OrderIn      int    `json:"order"`
diff --git a/backend/plugins/zentao/models/migrationscripts/20221121_add_init_tables.go b/backend/plugins/zentao/models/migrationscripts/20221121_add_init_tables.go
index 8ac3262d7..e02a07de8 100644
--- a/backend/plugins/zentao/models/migrationscripts/20221121_add_init_tables.go
+++ b/backend/plugins/zentao/models/migrationscripts/20221121_add_init_tables.go
@@ -36,6 +36,7 @@ func (*addInitTables) Up(basicRes context.BasicRes) errors.Error {
 		&archived.ZentaoStory{},
 		&archived.ZentaoBug{},
 		&archived.ZentaoTask{},
+		&archived.ZentaoDepartment{},
 		"_tool_zentao_bugs`",
 		"_tool_zentao_executions`",
 		"_tool_zentao_products`",
@@ -60,7 +61,7 @@ func (*addInitTables) Up(basicRes context.BasicRes) errors.Error {
 }
 
 func (*addInitTables) Version() uint64 {
-	return 20221121000001
+	return 20230303000001
 }
 
 func (*addInitTables) Name() string {
diff --git a/config-ui/src/plugins/register/zentao/config.ts b/config-ui/src/plugins/register/zentao/config.ts
index b3f99b8fe..65df64a7a 100644
--- a/config-ui/src/plugins/register/zentao/config.ts
+++ b/config-ui/src/plugins/register/zentao/config.ts
@@ -34,7 +34,7 @@ export const ZenTaoConfig: PluginConfigType = {
       'name',
       {
         key: 'endpoint',
-        subLabel: 'Provide the Zentao instance API endpoint. E.g. https://YOUR_DOMAIN:YOUR_PORT/',
+        subLabel: 'Provide the Zentao instance API endpoint (Opensource v16+). E.g. http://<host>:<port>/zentao/api.php/v1',
       },
       'username',
       'password',