Skip to content

Commit

Permalink
fix(zentao): update the type of PriOrder (apache#6986)
Browse files Browse the repository at this point in the history
  • Loading branch information
d4x1 committed Feb 21, 2024
1 parent 62aaedb commit 1bb4364
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 62 deletions.
108 changes: 54 additions & 54 deletions backend/plugins/zentao/models/story.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,60 +22,60 @@ import (
)

type ZentaoStoryRes struct {
ID int64 `json:"id"`
Vision string `json:"vision"`
Parent int64 `json:"parent"`
Product int64 `json:"product"`
Branch int `json:"branch"`
Module int `json:"module"`
Plan string `json:"plan"`
Source string `json:"source"`
SourceNote string `json:"sourceNote"`
FromBug int `json:"fromBug"`
Feedback int `json:"feedback"`
Title string `json:"title"`
Keywords string `json:"keywords"`
Type string `json:"type"`
Category string `json:"category"`
Pri int `json:"pri"`
Estimate float64 `json:"estimate"`
Status string `json:"status"`
SubStatus string `json:"subStatus"`
Color string `json:"color"`
Stage string `json:"stage"`
Mailto []interface{} `json:"mailto"`
Lib int `json:"lib"`
FromStory int64 `json:"fromStory"`
FromVersion int `json:"fromVersion"`
OpenedBy *ApiAccount `json:"openedBy"`
OpenedDate *common.Iso8601Time `json:"openedDate"`
AssignedTo *ApiAccount `json:"assignedTo"`
AssignedDate *common.Iso8601Time `json:"assignedDate"`
ApprovedDate *common.Iso8601Time `json:"approvedDate"`
LastEditedBy *ApiAccount `json:"lastEditedBy"`
LastEditedDate *common.Iso8601Time `json:"lastEditedDate"`
ChangedBy string `json:"changedBy"`
ChangedDate *common.Iso8601Time `json:"changedDate"`
ReviewedBy *ApiAccount `json:"reviewedBy"`
ReviewedDate *common.Iso8601Time `json:"reviewedDate"`
ClosedBy *ApiAccount `json:"closedBy"`
ClosedDate *common.Iso8601Time `json:"closedDate"`
ClosedReason string `json:"closedReason"`
ActivatedDate *common.Iso8601Time `json:"activatedDate"`
ToBug int `json:"toBug"`
ChildStories string `json:"childStories"`
LinkStories string `json:"linkStories"`
LinkRequirements string `json:"linkRequirements"`
DuplicateStory int64 `json:"duplicateStory"`
Version int `json:"version"`
StoryChanged string `json:"storyChanged"`
FeedbackBy string `json:"feedbackBy"`
NotifyEmail string `json:"notifyEmail"`
URChanged string `json:"URChanged"`
Deleted bool `json:"deleted"`
PriOrder string `json:"priOrder"`
PlanTitle string `json:"planTitle"`
ProductStatus string `json:"productStatus"`
ID int64 `json:"id"`
Vision string `json:"vision"`
Parent int64 `json:"parent"`
Product int64 `json:"product"`
Branch int `json:"branch"`
Module int `json:"module"`
Plan string `json:"plan"`
Source string `json:"source"`
SourceNote string `json:"sourceNote"`
FromBug int `json:"fromBug"`
Feedback int `json:"feedback"`
Title string `json:"title"`
Keywords string `json:"keywords"`
Type string `json:"type"`
Category string `json:"category"`
Pri int `json:"pri"`
Estimate float64 `json:"estimate"`
Status string `json:"status"`
SubStatus string `json:"subStatus"`
Color string `json:"color"`
Stage string `json:"stage"`
Mailto []interface{} `json:"mailto"`
Lib int `json:"lib"`
FromStory int64 `json:"fromStory"`
FromVersion int `json:"fromVersion"`
OpenedBy *ApiAccount `json:"openedBy"`
OpenedDate *common.Iso8601Time `json:"openedDate"`
AssignedTo *ApiAccount `json:"assignedTo"`
AssignedDate *common.Iso8601Time `json:"assignedDate"`
ApprovedDate *common.Iso8601Time `json:"approvedDate"`
LastEditedBy *ApiAccount `json:"lastEditedBy"`
LastEditedDate *common.Iso8601Time `json:"lastEditedDate"`
ChangedBy string `json:"changedBy"`
ChangedDate *common.Iso8601Time `json:"changedDate"`
ReviewedBy *ApiAccount `json:"reviewedBy"`
ReviewedDate *common.Iso8601Time `json:"reviewedDate"`
ClosedBy *ApiAccount `json:"closedBy"`
ClosedDate *common.Iso8601Time `json:"closedDate"`
ClosedReason string `json:"closedReason"`
ActivatedDate *common.Iso8601Time `json:"activatedDate"`
ToBug int `json:"toBug"`
ChildStories string `json:"childStories"`
LinkStories string `json:"linkStories"`
LinkRequirements string `json:"linkRequirements"`
DuplicateStory int64 `json:"duplicateStory"`
Version int `json:"version"`
StoryChanged string `json:"storyChanged"`
FeedbackBy string `json:"feedbackBy"`
NotifyEmail string `json:"notifyEmail"`
URChanged string `json:"URChanged"`
Deleted bool `json:"deleted"`
PriOrder *common.StringFloat64 `json:"priOrder"`
PlanTitle string `json:"planTitle"`
ProductStatus string `json:"productStatus"`
}

type ZentaoStory struct {
Expand Down
12 changes: 6 additions & 6 deletions backend/plugins/zentao/models/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ type ZentaoTaskRes struct {
} `json:"latestStoryVersion"`
StoryStatus interface {
} `json:"storyStatus"`
AssignedToRealName string `json:"assignedToRealName"`
PriOrder string `json:"priOrder"`
Children []*ZentaoTaskRes `json:"children"`
Delay int `json:"delay"`
NeedConfirm bool `json:"needConfirm"`
Progress float64 `json:"progress"`
AssignedToRealName string `json:"assignedToRealName"`
PriOrder *common.StringFloat64 `json:"priOrder"`
Children []*ZentaoTaskRes `json:"children"`
Delay int `json:"delay"`
NeedConfirm bool `json:"needConfirm"`
Progress float64 `json:"progress"`
}

func (zentaoTaskRes ZentaoTaskRes) ToJsonRawMessage() (json.RawMessage, error) {
Expand Down
2 changes: 1 addition & 1 deletion backend/plugins/zentao/tasks/story_extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func ExtractStory(taskCtx plugin.SubTaskContext) errors.Error {
NotifyEmail: res.NotifyEmail,
URChanged: res.URChanged,
Deleted: res.Deleted,
PriOrder: res.PriOrder,
PriOrder: res.PriOrder.String(),
PlanTitle: res.PlanTitle,
Url: row.Url,
}
Expand Down
2 changes: 1 addition & 1 deletion backend/plugins/zentao/tasks/task_extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (c *taskExtractor) toZentaoTasks(accountCache *AccountCache, res *models.Ze
StoryTitle: res.StoryTitle,
LatestStoryVersion: 0,
AssignedToRealName: res.AssignedToRealName,
PriOrder: res.PriOrder,
PriOrder: res.PriOrder.String(),
NeedConfirm: res.NeedConfirm,
Progress: res.Progress,
Url: url,
Expand Down

0 comments on commit 1bb4364

Please sign in to comment.