This is an automated email from the ASF dual-hosted git repository.
klesh 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 06c990360 fix(zentao): update sql when generating table
issue_changelogs (#6999)
06c990360 is described below
commit 06c9903601855959a270770733f97b1034590371
Author: Lynwee <[email protected]>
AuthorDate: Fri Feb 23 14:10:32 2024 +0800
fix(zentao): update sql when generating table issue_changelogs (#6999)
---
backend/plugins/zentao/tasks/changelog_convertor.go | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/backend/plugins/zentao/tasks/changelog_convertor.go
b/backend/plugins/zentao/tasks/changelog_convertor.go
index 6269b7bfb..61d3d1ec5 100644
--- a/backend/plugins/zentao/tasks/changelog_convertor.go
+++ b/backend/plugins/zentao/tasks/changelog_convertor.go
@@ -81,10 +81,9 @@ func ConvertChangelog(taskCtx plugin.SubTaskContext)
errors.Error {
cursor, err := db.Cursor(
dal.Select(fmt.Sprintf("*,%s.id cid,%s.id cdid,%s.id aid ", cn,
cdn, an)),
dal.From(&models.ZentaoChangelog{}),
- dal.Join(fmt.Sprintf("LEFT JOIN %s on %s.changelog_id = %s.id",
cdn, cdn, cn)),
- dal.Join(fmt.Sprintf("LEFT JOIN %s on %s.realname = %s.actor",
an, an, cn)),
- dal.Where(fmt.Sprintf(`%s.project = ? and %s.connection_id = ?`,
- cn, cn),
+ dal.Join(fmt.Sprintf("LEFT JOIN %s on %s.changelog_id = %s.id
and %s.connection_id = %d", cdn, cdn, cn, cdn, data.Options.ConnectionId)),
+ dal.Join(fmt.Sprintf("LEFT JOIN %s on %s.realname = %s.actor
and %s.connection_id = %d", an, an, cn, an, data.Options.ConnectionId)),
+ dal.Where(fmt.Sprintf(`%s.project = ? and %s.connection_id =
?`, cn, cn),
data.Options.ProjectId,
data.Options.ConnectionId),
)