Skip to content

Commit c39b247

Browse files
fix(zentao): update the type of PriOrder (#6986) (#6987)
Co-authored-by: Lynwee <linwei.hou@merico.dev>
1 parent 7f09d29 commit c39b247

4 files changed

Lines changed: 62 additions & 62 deletions

File tree

backend/plugins/zentao/models/story.go

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -22,60 +22,60 @@ import (
2222
)
2323

2424
type ZentaoStoryRes struct {
25-
ID int64 `json:"id"`
26-
Vision string `json:"vision"`
27-
Parent int64 `json:"parent"`
28-
Product int64 `json:"product"`
29-
Branch int `json:"branch"`
30-
Module int `json:"module"`
31-
Plan string `json:"plan"`
32-
Source string `json:"source"`
33-
SourceNote string `json:"sourceNote"`
34-
FromBug int `json:"fromBug"`
35-
Feedback int `json:"feedback"`
36-
Title string `json:"title"`
37-
Keywords string `json:"keywords"`
38-
Type string `json:"type"`
39-
Category string `json:"category"`
40-
Pri int `json:"pri"`
41-
Estimate float64 `json:"estimate"`
42-
Status string `json:"status"`
43-
SubStatus string `json:"subStatus"`
44-
Color string `json:"color"`
45-
Stage string `json:"stage"`
46-
Mailto []interface{} `json:"mailto"`
47-
Lib int `json:"lib"`
48-
FromStory int64 `json:"fromStory"`
49-
FromVersion int `json:"fromVersion"`
50-
OpenedBy *ApiAccount `json:"openedBy"`
51-
OpenedDate *common.Iso8601Time `json:"openedDate"`
52-
AssignedTo *ApiAccount `json:"assignedTo"`
53-
AssignedDate *common.Iso8601Time `json:"assignedDate"`
54-
ApprovedDate *common.Iso8601Time `json:"approvedDate"`
55-
LastEditedBy *ApiAccount `json:"lastEditedBy"`
56-
LastEditedDate *common.Iso8601Time `json:"lastEditedDate"`
57-
ChangedBy string `json:"changedBy"`
58-
ChangedDate *common.Iso8601Time `json:"changedDate"`
59-
ReviewedBy *ApiAccount `json:"reviewedBy"`
60-
ReviewedDate *common.Iso8601Time `json:"reviewedDate"`
61-
ClosedBy *ApiAccount `json:"closedBy"`
62-
ClosedDate *common.Iso8601Time `json:"closedDate"`
63-
ClosedReason string `json:"closedReason"`
64-
ActivatedDate *common.Iso8601Time `json:"activatedDate"`
65-
ToBug int `json:"toBug"`
66-
ChildStories string `json:"childStories"`
67-
LinkStories string `json:"linkStories"`
68-
LinkRequirements string `json:"linkRequirements"`
69-
DuplicateStory int64 `json:"duplicateStory"`
70-
Version int `json:"version"`
71-
StoryChanged string `json:"storyChanged"`
72-
FeedbackBy string `json:"feedbackBy"`
73-
NotifyEmail string `json:"notifyEmail"`
74-
URChanged string `json:"URChanged"`
75-
Deleted bool `json:"deleted"`
76-
PriOrder string `json:"priOrder"`
77-
PlanTitle string `json:"planTitle"`
78-
ProductStatus string `json:"productStatus"`
25+
ID int64 `json:"id"`
26+
Vision string `json:"vision"`
27+
Parent int64 `json:"parent"`
28+
Product int64 `json:"product"`
29+
Branch int `json:"branch"`
30+
Module int `json:"module"`
31+
Plan string `json:"plan"`
32+
Source string `json:"source"`
33+
SourceNote string `json:"sourceNote"`
34+
FromBug int `json:"fromBug"`
35+
Feedback int `json:"feedback"`
36+
Title string `json:"title"`
37+
Keywords string `json:"keywords"`
38+
Type string `json:"type"`
39+
Category string `json:"category"`
40+
Pri int `json:"pri"`
41+
Estimate float64 `json:"estimate"`
42+
Status string `json:"status"`
43+
SubStatus string `json:"subStatus"`
44+
Color string `json:"color"`
45+
Stage string `json:"stage"`
46+
Mailto []interface{} `json:"mailto"`
47+
Lib int `json:"lib"`
48+
FromStory int64 `json:"fromStory"`
49+
FromVersion int `json:"fromVersion"`
50+
OpenedBy *ApiAccount `json:"openedBy"`
51+
OpenedDate *common.Iso8601Time `json:"openedDate"`
52+
AssignedTo *ApiAccount `json:"assignedTo"`
53+
AssignedDate *common.Iso8601Time `json:"assignedDate"`
54+
ApprovedDate *common.Iso8601Time `json:"approvedDate"`
55+
LastEditedBy *ApiAccount `json:"lastEditedBy"`
56+
LastEditedDate *common.Iso8601Time `json:"lastEditedDate"`
57+
ChangedBy string `json:"changedBy"`
58+
ChangedDate *common.Iso8601Time `json:"changedDate"`
59+
ReviewedBy *ApiAccount `json:"reviewedBy"`
60+
ReviewedDate *common.Iso8601Time `json:"reviewedDate"`
61+
ClosedBy *ApiAccount `json:"closedBy"`
62+
ClosedDate *common.Iso8601Time `json:"closedDate"`
63+
ClosedReason string `json:"closedReason"`
64+
ActivatedDate *common.Iso8601Time `json:"activatedDate"`
65+
ToBug int `json:"toBug"`
66+
ChildStories string `json:"childStories"`
67+
LinkStories string `json:"linkStories"`
68+
LinkRequirements string `json:"linkRequirements"`
69+
DuplicateStory int64 `json:"duplicateStory"`
70+
Version int `json:"version"`
71+
StoryChanged string `json:"storyChanged"`
72+
FeedbackBy string `json:"feedbackBy"`
73+
NotifyEmail string `json:"notifyEmail"`
74+
URChanged string `json:"URChanged"`
75+
Deleted bool `json:"deleted"`
76+
PriOrder *common.StringFloat64 `json:"priOrder"`
77+
PlanTitle string `json:"planTitle"`
78+
ProductStatus string `json:"productStatus"`
7979
}
8080

8181
type ZentaoStory struct {

backend/plugins/zentao/models/task.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ type ZentaoTaskRes struct {
8383
} `json:"latestStoryVersion"`
8484
StoryStatus interface {
8585
} `json:"storyStatus"`
86-
AssignedToRealName string `json:"assignedToRealName"`
87-
PriOrder string `json:"priOrder"`
88-
Children []*ZentaoTaskRes `json:"children"`
89-
Delay int `json:"delay"`
90-
NeedConfirm bool `json:"needConfirm"`
91-
Progress float64 `json:"progress"`
86+
AssignedToRealName string `json:"assignedToRealName"`
87+
PriOrder *common.StringFloat64 `json:"priOrder"`
88+
Children []*ZentaoTaskRes `json:"children"`
89+
Delay int `json:"delay"`
90+
NeedConfirm bool `json:"needConfirm"`
91+
Progress float64 `json:"progress"`
9292
}
9393

9494
func (zentaoTaskRes ZentaoTaskRes) ToJsonRawMessage() (json.RawMessage, error) {

backend/plugins/zentao/tasks/story_extractor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func ExtractStory(taskCtx plugin.SubTaskContext) errors.Error {
120120
NotifyEmail: res.NotifyEmail,
121121
URChanged: res.URChanged,
122122
Deleted: res.Deleted,
123-
PriOrder: res.PriOrder,
123+
PriOrder: res.PriOrder.String(),
124124
PlanTitle: res.PlanTitle,
125125
Url: row.Url,
126126
}

backend/plugins/zentao/tasks/task_extractor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func (c *taskExtractor) toZentaoTasks(accountCache *AccountCache, res *models.Ze
146146
StoryTitle: res.StoryTitle,
147147
LatestStoryVersion: 0,
148148
AssignedToRealName: res.AssignedToRealName,
149-
PriOrder: res.PriOrder,
149+
PriOrder: res.PriOrder.String(),
150150
NeedConfirm: res.NeedConfirm,
151151
Progress: res.Progress,
152152
Url: url,

0 commit comments

Comments
 (0)