This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch release-v0.18
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.18 by this push:
new eb16eedcd fix(zentao): fix progress field when configurating scopes
(#6091)
eb16eedcd is described below
commit eb16eedcd0f283269cd003a7669fea8edd85ed37
Author: Lynwee <[email protected]>
AuthorDate: Thu Sep 14 16:32:33 2023 +0800
fix(zentao): fix progress field when configurating scopes (#6091)
---
backend/plugins/zentao/models/project.go | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/backend/plugins/zentao/models/project.go
b/backend/plugins/zentao/models/project.go
index 7ab66b527..403692a43 100644
--- a/backend/plugins/zentao/models/project.go
+++ b/backend/plugins/zentao/models/project.go
@@ -90,10 +90,11 @@ type ZentaoProject struct {
TeamCount int `json:"teamCount" mapstructure:"teamCount"`
LeftTasks string `json:"leftTasks" mapstructure:"leftTasks"`
//TeamMembers []interface{} `json:"teamMembers" gorm:"-"`
- TotalEstimate float64 `json:"totalEstimate"
mapstructure:"totalEstimate"`
- TotalConsumed float64 `json:"totalConsumed"
mapstructure:"totalConsumed"`
- TotalLeft float64 `json:"totalLeft" mapstructure:"totalLeft"`
- Progress interface{} `json:"progress" mapstructure:"progress"`
+ TotalEstimate float64 `json:"totalEstimate"
mapstructure:"totalEstimate"`
+ TotalConsumed float64 `json:"totalConsumed"
mapstructure:"totalConsumed"`
+ TotalLeft float64 `json:"totalLeft" mapstructure:"totalLeft"`
+ Progress float64
+ ProgressRes interface{} `json:"progress" mapstructure:"progress"
gorm:"-"`
ScopeConfigId uint64 `json:"scopeConfigId,omitempty"
mapstructure:"scopeConfigId"`
}
@@ -118,7 +119,7 @@ type Hours struct {
}
func (p *ZentaoProject) fixProgressField() {
- p.Progress = cast.ToFloat64(p.Progress)
+ p.Progress = cast.ToFloat64(p.ProgressRes)
}
func (p *ZentaoProject) fixClosedByResField() {