Skip to content

Commit eb16eed

Browse files
authored
fix(zentao): fix progress field when configurating scopes (#6091)
1 parent eb12486 commit eb16eed

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

backend/plugins/zentao/models/project.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ type ZentaoProject struct {
9090
TeamCount int `json:"teamCount" mapstructure:"teamCount"`
9191
LeftTasks string `json:"leftTasks" mapstructure:"leftTasks"`
9292
//TeamMembers []interface{} `json:"teamMembers" gorm:"-"`
93-
TotalEstimate float64 `json:"totalEstimate" mapstructure:"totalEstimate"`
94-
TotalConsumed float64 `json:"totalConsumed" mapstructure:"totalConsumed"`
95-
TotalLeft float64 `json:"totalLeft" mapstructure:"totalLeft"`
96-
Progress interface{} `json:"progress" mapstructure:"progress"`
93+
TotalEstimate float64 `json:"totalEstimate" mapstructure:"totalEstimate"`
94+
TotalConsumed float64 `json:"totalConsumed" mapstructure:"totalConsumed"`
95+
TotalLeft float64 `json:"totalLeft" mapstructure:"totalLeft"`
96+
Progress float64
97+
ProgressRes interface{} `json:"progress" mapstructure:"progress" gorm:"-"`
9798
ScopeConfigId uint64 `json:"scopeConfigId,omitempty" mapstructure:"scopeConfigId"`
9899
}
99100

@@ -118,7 +119,7 @@ type Hours struct {
118119
}
119120

120121
func (p *ZentaoProject) fixProgressField() {
121-
p.Progress = cast.ToFloat64(p.Progress)
122+
p.Progress = cast.ToFloat64(p.ProgressRes)
122123
}
123124

124125
func (p *ZentaoProject) fixClosedByResField() {

0 commit comments

Comments
 (0)