You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ly...@apache.org on 2024/02/21 10:05:08 UTC
(incubator-devlake) branch release-v0.21 updated: fix(zentao): update the type of `PriOrder` (#6986) (#6987)
This is an automated email from the ASF dual-hosted git repository.
lynwee pushed a commit to branch release-v0.21
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.21 by this push:
new c39b24769 fix(zentao): update the type of `PriOrder` (#6986) (#6987)
c39b24769 is described below
commit c39b24769d5d91e4dc0a56002826689bf18fc9da
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Wed Feb 21 18:05:03 2024 +0800
fix(zentao): update the type of `PriOrder` (#6986) (#6987)
Co-authored-by: Lynwee <li...@merico.dev>
---
backend/plugins/zentao/models/story.go | 108 ++++++++++++------------
backend/plugins/zentao/models/task.go | 12 +--
backend/plugins/zentao/tasks/story_extractor.go | 2 +-
backend/plugins/zentao/tasks/task_extractor.go | 2 +-
4 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/backend/plugins/zentao/models/story.go b/backend/plugins/zentao/models/story.go
index 661a62603..42956b7fa 100644
--- a/backend/plugins/zentao/models/story.go
+++ b/backend/plugins/zentao/models/story.go
@@ -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 {
diff --git a/backend/plugins/zentao/models/task.go b/backend/plugins/zentao/models/task.go
index 8bbc5fe38..494d64aa9 100644
--- a/backend/plugins/zentao/models/task.go
+++ b/backend/plugins/zentao/models/task.go
@@ -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) {
diff --git a/backend/plugins/zentao/tasks/story_extractor.go b/backend/plugins/zentao/tasks/story_extractor.go
index 7f94c4f07..1d00dcf9e 100644
--- a/backend/plugins/zentao/tasks/story_extractor.go
+++ b/backend/plugins/zentao/tasks/story_extractor.go
@@ -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,
}
diff --git a/backend/plugins/zentao/tasks/task_extractor.go b/backend/plugins/zentao/tasks/task_extractor.go
index d18701c29..422e5eead 100644
--- a/backend/plugins/zentao/tasks/task_extractor.go
+++ b/backend/plugins/zentao/tasks/task_extractor.go
@@ -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,