This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch release-v0.19
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.19 by this push:
new a93f7b72e fix(zentao): fix progress field when configurating scopes
(#6090)
a93f7b72e is described below
commit a93f7b72e74773b318bb8e6215e795b49fc16c55
Author: Lynwee <[email protected]>
AuthorDate: Thu Sep 14 16:32:25 2023 +0800
fix(zentao): fix progress field when configurating scopes (#6090)
---
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 c853131e1..427dc5244 100644
--- a/backend/plugins/zentao/models/project.go
+++ b/backend/plugins/zentao/models/project.go
@@ -89,10 +89,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"`
}
@@ -117,7 +118,7 @@ type Hours struct {
}
func (p *ZentaoProject) fixProgressField() {
- p.Progress = cast.ToFloat64(p.Progress)
+ p.Progress = cast.ToFloat64(p.ProgressRes)
}
func (p *ZentaoProject) fixClosedByResField() {