You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/06/21 13:34:47 UTC
[incubator-devlake] branch main updated: fix(tapd): change remaining CSTTIMe to pointer
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 3cd6a729 fix(tapd): change remaining CSTTIMe to pointer
3cd6a729 is described below
commit 3cd6a72949394c23034acad2a7026ee32e8e9c67
Author: Yingchu Chen <yi...@merico.dev>
AuthorDate: Tue Jun 21 21:29:08 2022 +0800
fix(tapd): change remaining CSTTIMe to pointer
closes #2292
---
plugins/tapd/models/bug_changelog.go | 20 ++++++++---------
plugins/tapd/models/iteration_bug.go | 4 ++--
plugins/tapd/models/iteration_story.go | 4 ++--
plugins/tapd/models/iteration_task.go | 4 ++--
.../migrationscripts/archived/bug_changelog.go | 20 ++++++++---------
.../migrationscripts/archived/iteration_bug.go | 4 ++--
.../migrationscripts/archived/iteration_story.go | 4 ++--
.../migrationscripts/archived/iteration_task.go | 4 ++--
.../migrationscripts/archived/story_category.go | 14 ++++++------
.../migrationscripts/archived/story_changelog.go | 22 +++++++++---------
.../migrationscripts/archived/task_changelog.go | 24 ++++++++++----------
.../models/migrationscripts/archived/workspace.go | 26 +++++++++++-----------
plugins/tapd/models/story_category.go | 14 ++++++------
plugins/tapd/models/story_changelog.go | 22 +++++++++---------
plugins/tapd/models/task_changelog.go | 24 ++++++++++----------
plugins/tapd/models/workspace.go | 26 +++++++++++-----------
plugins/tapd/tasks/bug_changelog_collector.go | 2 +-
plugins/tapd/tasks/bug_converter.go | 6 ++---
plugins/tapd/tasks/bug_extractor.go | 4 ++--
plugins/tapd/tasks/story_changelog_collector.go | 2 +-
plugins/tapd/tasks/story_extractor.go | 4 ++--
plugins/tapd/tasks/task_changelog_collector.go | 2 +-
plugins/tapd/tasks/task_extractor.go | 4 ++--
23 files changed, 130 insertions(+), 130 deletions(-)
diff --git a/plugins/tapd/models/bug_changelog.go b/plugins/tapd/models/bug_changelog.go
index f8dbadfd..9855c70c 100644
--- a/plugins/tapd/models/bug_changelog.go
+++ b/plugins/tapd/models/bug_changelog.go
@@ -23,16 +23,16 @@ import (
)
type TapdBugChangelog struct {
- ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- WorkspaceId uint64 `gorm:"type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
- BugId uint64 `json:"bug_id,string"`
- Author string `json:"author" gorm:"type:varchar(255)"`
- Field string `gorm:"primaryKey;type:varchar(255)" json:"field"`
- OldValue string `json:"old_value"`
- NewValue string `json:"new_value"`
- Memo string `json:"memo" gorm:"type:text"`
- Created helper.CSTTime `json:"created"`
+ ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
+ WorkspaceId uint64 `gorm:"type:BIGINT NOT NULL"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ BugId uint64 `json:"bug_id,string"`
+ Author string `json:"author" gorm:"type:varchar(255)"`
+ Field string `gorm:"primaryKey;type:varchar(255)" json:"field"`
+ OldValue string `json:"old_value"`
+ NewValue string `json:"new_value"`
+ Memo string `json:"memo" gorm:"type:text"`
+ Created *helper.CSTTime `json:"created"`
common.NoPKModel
}
diff --git a/plugins/tapd/models/iteration_bug.go b/plugins/tapd/models/iteration_bug.go
index 09c948e2..fd8230cb 100644
--- a/plugins/tapd/models/iteration_bug.go
+++ b/plugins/tapd/models/iteration_bug.go
@@ -28,8 +28,8 @@ type TapdIterationBug struct {
IterationId uint64 `gorm:"primaryKey"`
WorkspaceId uint64 `gorm:"primaryKey"`
BugId uint64 `gorm:"primaryKey"`
- ResolutionDate helper.CSTTime
- BugCreatedDate helper.CSTTime
+ ResolutionDate *helper.CSTTime
+ BugCreatedDate *helper.CSTTime
}
func (TapdIterationBug) TableName() string {
diff --git a/plugins/tapd/models/iteration_story.go b/plugins/tapd/models/iteration_story.go
index 11fd058c..1a7f662d 100644
--- a/plugins/tapd/models/iteration_story.go
+++ b/plugins/tapd/models/iteration_story.go
@@ -29,8 +29,8 @@ type TapdIterationStory struct {
WorkspaceId uint64 `gorm:"primaryKey"`
StoryId uint64 `gorm:"primaryKey"`
- ResolutionDate helper.CSTTime
- StoryCreatedDate helper.CSTTime
+ ResolutionDate *helper.CSTTime
+ StoryCreatedDate *helper.CSTTime
}
func (TapdIterationStory) TableName() string {
diff --git a/plugins/tapd/models/iteration_task.go b/plugins/tapd/models/iteration_task.go
index 65c1ad82..5a176de1 100644
--- a/plugins/tapd/models/iteration_task.go
+++ b/plugins/tapd/models/iteration_task.go
@@ -29,8 +29,8 @@ type TapdIterationTask struct {
WorkspaceId uint64 `gorm:"primaryKey"`
TaskId uint64 `gorm:"primaryKey"`
- ResolutionDate helper.CSTTime
- TaskCreatedDate helper.CSTTime
+ ResolutionDate *helper.CSTTime
+ TaskCreatedDate *helper.CSTTime
}
func (TapdIterationTask) TableName() string {
diff --git a/plugins/tapd/models/migrationscripts/archived/bug_changelog.go b/plugins/tapd/models/migrationscripts/archived/bug_changelog.go
index af49c605..c6ba2136 100644
--- a/plugins/tapd/models/migrationscripts/archived/bug_changelog.go
+++ b/plugins/tapd/models/migrationscripts/archived/bug_changelog.go
@@ -23,16 +23,16 @@ import (
)
type TapdBugChangelog struct {
- ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- WorkspaceId uint64 `gorm:"type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
- BugId uint64 `json:"bug_id,string"`
- Author string `json:"author" gorm:"type:varchar(255)"`
- Field string `gorm:"primaryKey;type:varchar(255)" json:"field"`
- OldValue string `json:"old_value"`
- NewValue string `json:"new_value"`
- Memo string `json:"memo" gorm:"type:text"`
- Created helper.CSTTime `json:"created"`
+ ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
+ WorkspaceId uint64 `gorm:"type:BIGINT NOT NULL"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ BugId uint64 `json:"bug_id,string"`
+ Author string `json:"author" gorm:"type:varchar(255)"`
+ Field string `gorm:"primaryKey;type:varchar(255)" json:"field"`
+ OldValue string `json:"old_value"`
+ NewValue string `json:"new_value"`
+ Memo string `json:"memo" gorm:"type:text"`
+ Created *helper.CSTTime `json:"created"`
archived.NoPKModel
}
diff --git a/plugins/tapd/models/migrationscripts/archived/iteration_bug.go b/plugins/tapd/models/migrationscripts/archived/iteration_bug.go
index 6c4b0bc3..1878e903 100644
--- a/plugins/tapd/models/migrationscripts/archived/iteration_bug.go
+++ b/plugins/tapd/models/migrationscripts/archived/iteration_bug.go
@@ -28,8 +28,8 @@ type TapdIterationBug struct {
IterationId uint64 `gorm:"primaryKey"`
WorkspaceId uint64 `gorm:"primaryKey"`
BugId uint64 `gorm:"primaryKey"`
- ResolutionDate helper.CSTTime
- BugCreatedDate helper.CSTTime
+ ResolutionDate *helper.CSTTime
+ BugCreatedDate *helper.CSTTime
}
func (TapdIterationBug) TableName() string {
diff --git a/plugins/tapd/models/migrationscripts/archived/iteration_story.go b/plugins/tapd/models/migrationscripts/archived/iteration_story.go
index f4f81188..c5375191 100644
--- a/plugins/tapd/models/migrationscripts/archived/iteration_story.go
+++ b/plugins/tapd/models/migrationscripts/archived/iteration_story.go
@@ -28,8 +28,8 @@ type TapdIterationStory struct {
IterationId uint64 `gorm:"primaryKey"`
WorkspaceId uint64 `gorm:"primaryKey"`
StoryId uint64 `gorm:"primaryKey"`
- ResolutionDate helper.CSTTime
- StoryCreatedDate helper.CSTTime
+ ResolutionDate *helper.CSTTime
+ StoryCreatedDate *helper.CSTTime
}
func (TapdIterationStory) TableName() string {
diff --git a/plugins/tapd/models/migrationscripts/archived/iteration_task.go b/plugins/tapd/models/migrationscripts/archived/iteration_task.go
index 40aa23c7..accd54d9 100644
--- a/plugins/tapd/models/migrationscripts/archived/iteration_task.go
+++ b/plugins/tapd/models/migrationscripts/archived/iteration_task.go
@@ -28,8 +28,8 @@ type TapdIterationTask struct {
IterationId uint64 `gorm:"primaryKey"`
TaskId uint64 `gorm:"primaryKey"`
WorkspaceId uint64 `gorm:"primaryKey"`
- ResolutionDate helper.CSTTime
- TaskCreatedDate helper.CSTTime
+ ResolutionDate *helper.CSTTime
+ TaskCreatedDate *helper.CSTTime
}
func (TapdIterationTask) TableName() string {
diff --git a/plugins/tapd/models/migrationscripts/archived/story_category.go b/plugins/tapd/models/migrationscripts/archived/story_category.go
index 9eecd58f..0245956a 100644
--- a/plugins/tapd/models/migrationscripts/archived/story_category.go
+++ b/plugins/tapd/models/migrationscripts/archived/story_category.go
@@ -23,13 +23,13 @@ import (
)
type TapdStoryCategory struct {
- ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
- Name string `json:"name" gorm:"type:varchar(255)"`
- Description string `json:"description"`
- ParentId uint64 `json:"parent_id,string"`
- Created helper.CSTTime `json:"created"`
- Modified helper.CSTTime `json:"modified"`
+ ConnectionId uint64 `gorm:"primaryKey"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Name string `json:"name" gorm:"type:varchar(255)"`
+ Description string `json:"description"`
+ ParentId uint64 `json:"parent_id,string"`
+ Created *helper.CSTTime `json:"created"`
+ Modified *helper.CSTTime `json:"modified"`
archived.NoPKModel
}
diff --git a/plugins/tapd/models/migrationscripts/archived/story_changelog.go b/plugins/tapd/models/migrationscripts/archived/story_changelog.go
index 4e50e93f..1442bfac 100644
--- a/plugins/tapd/models/migrationscripts/archived/story_changelog.go
+++ b/plugins/tapd/models/migrationscripts/archived/story_changelog.go
@@ -23,17 +23,17 @@ import (
)
type TapdStoryChangelog struct {
- ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
- WorkspaceId uint64 `json:"workspace_id,string"`
- WorkitemTypeId uint64 `json:"workitem_type_id,string"`
- Creator string `json:"creator" gorm:"type:varchar(255)"`
- Created helper.CSTTime `json:"created"`
- ChangeSummary string `json:"change_summary" gorm:"type:varchar(255)"`
- Comment string `json:"comment"`
- EntityType string `json:"entity_type" gorm:"type:varchar(255)"`
- ChangeType string `json:"change_type" gorm:"type:varchar(255)"`
- StoryId uint64 `json:"story_id,string"`
+ ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ WorkspaceId uint64 `json:"workspace_id,string"`
+ WorkitemTypeId uint64 `json:"workitem_type_id,string"`
+ Creator string `json:"creator" gorm:"type:varchar(255)"`
+ Created *helper.CSTTime `json:"created"`
+ ChangeSummary string `json:"change_summary" gorm:"type:varchar(255)"`
+ Comment string `json:"comment"`
+ EntityType string `json:"entity_type" gorm:"type:varchar(255)"`
+ ChangeType string `json:"change_type" gorm:"type:varchar(255)"`
+ StoryId uint64 `json:"story_id,string"`
archived.NoPKModel
FieldChanges []TapdStoryChangelogItem `json:"field_changes" gorm:"-"`
}
diff --git a/plugins/tapd/models/migrationscripts/archived/task_changelog.go b/plugins/tapd/models/migrationscripts/archived/task_changelog.go
index 2ee41065..faaf2958 100644
--- a/plugins/tapd/models/migrationscripts/archived/task_changelog.go
+++ b/plugins/tapd/models/migrationscripts/archived/task_changelog.go
@@ -23,18 +23,18 @@ import (
)
type TapdTaskChangelog struct {
- ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
- WorkspaceId uint64 `json:"workspace_id,string"`
- WorkitemTypeId uint64 `json:"workitem_type_id,string"`
- Creator string `json:"creator" gorm:"type:varchar(255)"`
- Created helper.CSTTime `json:"created"`
- ChangeSummary string `json:"change_summary" gorm:"type:varchar(255)"`
- Comment string `json:"comment"`
- EntityType string `json:"entity_type" gorm:"type:varchar(255)"`
- ChangeType string `json:"change_type" gorm:"type:varchar(255)"`
- ChangeTypeText string `json:"change_type_text" gorm:"type:varchar(255)"`
- TaskId uint64 `json:"task_id,string"`
+ ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ WorkspaceId uint64 `json:"workspace_id,string"`
+ WorkitemTypeId uint64 `json:"workitem_type_id,string"`
+ Creator string `json:"creator" gorm:"type:varchar(255)"`
+ Created *helper.CSTTime `json:"created"`
+ ChangeSummary string `json:"change_summary" gorm:"type:varchar(255)"`
+ Comment string `json:"comment"`
+ EntityType string `json:"entity_type" gorm:"type:varchar(255)"`
+ ChangeType string `json:"change_type" gorm:"type:varchar(255)"`
+ ChangeTypeText string `json:"change_type_text" gorm:"type:varchar(255)"`
+ TaskId uint64 `json:"task_id,string"`
archived.NoPKModel
FieldChanges []TapdTaskChangelogItem `json:"field_changes" gorm:"-"`
}
diff --git a/plugins/tapd/models/migrationscripts/archived/workspace.go b/plugins/tapd/models/migrationscripts/archived/workspace.go
index fbb7bb18..4028d6ab 100644
--- a/plugins/tapd/models/migrationscripts/archived/workspace.go
+++ b/plugins/tapd/models/migrationscripts/archived/workspace.go
@@ -23,19 +23,19 @@ import (
)
type TapdWorkspace struct {
- ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
- Name string `gorm:"type:varchar(255)" json:"name"`
- PrettyName string `gorm:"type:varchar(255)" json:"pretty_name"`
- Category string `gorm:"type:varchar(255)" json:"category"`
- Status string `gorm:"type:varchar(255)" json:"status"`
- Description string `json:"description"`
- BeginDate helper.CSTTime `json:"begin_date"`
- EndDate helper.CSTTime `json:"end_date"`
- ExternalOn string `gorm:"type:varchar(255)" json:"external_on"`
- ParentId uint64 `gorm:"type:BIGINT" json:"parent_id,string"`
- Creator string `gorm:"type:varchar(255)" json:"creator"`
- Created helper.CSTTime `json:"created"`
+ ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Name string `gorm:"type:varchar(255)" json:"name"`
+ PrettyName string `gorm:"type:varchar(255)" json:"pretty_name"`
+ Category string `gorm:"type:varchar(255)" json:"category"`
+ Status string `gorm:"type:varchar(255)" json:"status"`
+ Description string `json:"description"`
+ BeginDate *helper.CSTTime `json:"begin_date"`
+ EndDate *helper.CSTTime `json:"end_date"`
+ ExternalOn string `gorm:"type:varchar(255)" json:"external_on"`
+ ParentId uint64 `gorm:"type:BIGINT" json:"parent_id,string"`
+ Creator string `gorm:"type:varchar(255)" json:"creator"`
+ Created *helper.CSTTime `json:"created"`
archived.NoPKModel
}
diff --git a/plugins/tapd/models/story_category.go b/plugins/tapd/models/story_category.go
index 330b3c59..9f376a59 100644
--- a/plugins/tapd/models/story_category.go
+++ b/plugins/tapd/models/story_category.go
@@ -23,13 +23,13 @@ import (
)
type TapdStoryCategory struct {
- ConnectionId uint64 `gorm:"primaryKey"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
- Name string `json:"name" gorm:"type:varchar(255)"`
- Description string `json:"description"`
- ParentId uint64 `json:"parent_id,string"`
- Created helper.CSTTime `json:"created"`
- Modified helper.CSTTime `json:"modified"`
+ ConnectionId uint64 `gorm:"primaryKey"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Name string `json:"name" gorm:"type:varchar(255)"`
+ Description string `json:"description"`
+ ParentId uint64 `json:"parent_id,string"`
+ Created *helper.CSTTime `json:"created"`
+ Modified *helper.CSTTime `json:"modified"`
common.NoPKModel
}
diff --git a/plugins/tapd/models/story_changelog.go b/plugins/tapd/models/story_changelog.go
index 1f084496..28f58a30 100644
--- a/plugins/tapd/models/story_changelog.go
+++ b/plugins/tapd/models/story_changelog.go
@@ -24,17 +24,17 @@ import (
)
type TapdStoryChangelog struct {
- ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
- WorkspaceId uint64 `json:"workspace_id,string"`
- WorkitemTypeId uint64 `json:"workitem_type_id,string"`
- Creator string `json:"creator" gorm:"type:varchar(255)"`
- Created helper.CSTTime `json:"created"`
- ChangeSummary string `json:"change_summary" gorm:"type:varchar(255)"`
- Comment string `json:"comment"`
- EntityType string `json:"entity_type" gorm:"type:varchar(255)"`
- ChangeType string `json:"change_type" gorm:"type:varchar(255)"`
- StoryId uint64 `json:"story_id,string"`
+ ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ WorkspaceId uint64 `json:"workspace_id,string"`
+ WorkitemTypeId uint64 `json:"workitem_type_id,string"`
+ Creator string `json:"creator" gorm:"type:varchar(255)"`
+ Created *helper.CSTTime `json:"created"`
+ ChangeSummary string `json:"change_summary" gorm:"type:varchar(255)"`
+ Comment string `json:"comment"`
+ EntityType string `json:"entity_type" gorm:"type:varchar(255)"`
+ ChangeType string `json:"change_type" gorm:"type:varchar(255)"`
+ StoryId uint64 `json:"story_id,string"`
common.NoPKModel
FieldChanges []TapdStoryChangelogItemRes `json:"field_changes" gorm:"-"`
}
diff --git a/plugins/tapd/models/task_changelog.go b/plugins/tapd/models/task_changelog.go
index 280eebba..5177c85f 100644
--- a/plugins/tapd/models/task_changelog.go
+++ b/plugins/tapd/models/task_changelog.go
@@ -25,18 +25,18 @@ import (
)
type TapdTaskChangelog struct {
- ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
- WorkspaceId uint64 `json:"workspace_id,string"`
- WorkitemTypeId uint64 `json:"workitem_type_id,string"`
- Creator string `json:"creator" gorm:"type:varchar(255)"`
- Created helper.CSTTime `json:"created"`
- ChangeSummary string `json:"change_summary" gorm:"type:varchar(255)"`
- Comment string `json:"comment"`
- EntityType string `json:"entity_type" gorm:"type:varchar(255)"`
- ChangeType string `json:"change_type" gorm:"type:varchar(255)"`
- ChangeTypeText string `json:"change_type_text" gorm:"type:varchar(255)"`
- TaskId uint64 `json:"task_id,string"`
+ ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT NOT NULL" json:"id,string"`
+ WorkspaceId uint64 `json:"workspace_id,string"`
+ WorkitemTypeId uint64 `json:"workitem_type_id,string"`
+ Creator string `json:"creator" gorm:"type:varchar(255)"`
+ Created *helper.CSTTime `json:"created"`
+ ChangeSummary string `json:"change_summary" gorm:"type:varchar(255)"`
+ Comment string `json:"comment"`
+ EntityType string `json:"entity_type" gorm:"type:varchar(255)"`
+ ChangeType string `json:"change_type" gorm:"type:varchar(255)"`
+ ChangeTypeText string `json:"change_type_text" gorm:"type:varchar(255)"`
+ TaskId uint64 `json:"task_id,string"`
common.NoPKModel
FieldChanges []TapdTaskChangelogItemRes `json:"field_changes" gorm:"-"`
}
diff --git a/plugins/tapd/models/workspace.go b/plugins/tapd/models/workspace.go
index c78268e6..184febde 100644
--- a/plugins/tapd/models/workspace.go
+++ b/plugins/tapd/models/workspace.go
@@ -23,19 +23,19 @@ import (
)
type TapdWorkspace struct {
- ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
- Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
- Name string `gorm:"type:varchar(255)" json:"name"`
- PrettyName string `gorm:"type:varchar(255)" json:"pretty_name"`
- Category string `gorm:"type:varchar(255)" json:"category"`
- Status string `gorm:"type:varchar(255)" json:"status"`
- Description string `json:"description"`
- BeginDate helper.CSTTime `json:"begin_date"`
- EndDate helper.CSTTime `json:"end_date"`
- ExternalOn string `gorm:"type:varchar(255)" json:"external_on"`
- ParentId uint64 `gorm:"type:BIGINT" json:"parent_id,string"`
- Creator string `gorm:"type:varchar(255)" json:"creator"`
- Created helper.CSTTime `json:"created"`
+ ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
+ Id uint64 `gorm:"primaryKey;type:BIGINT" json:"id,string"`
+ Name string `gorm:"type:varchar(255)" json:"name"`
+ PrettyName string `gorm:"type:varchar(255)" json:"pretty_name"`
+ Category string `gorm:"type:varchar(255)" json:"category"`
+ Status string `gorm:"type:varchar(255)" json:"status"`
+ Description string `json:"description"`
+ BeginDate *helper.CSTTime `json:"begin_date"`
+ EndDate *helper.CSTTime `json:"end_date"`
+ ExternalOn string `gorm:"type:varchar(255)" json:"external_on"`
+ ParentId uint64 `gorm:"type:BIGINT" json:"parent_id,string"`
+ Creator string `gorm:"type:varchar(255)" json:"creator"`
+ Created *helper.CSTTime `json:"created"`
common.NoPKModel
}
diff --git a/plugins/tapd/tasks/bug_changelog_collector.go b/plugins/tapd/tasks/bug_changelog_collector.go
index 372ef30e..b2c2edfc 100644
--- a/plugins/tapd/tasks/bug_changelog_collector.go
+++ b/plugins/tapd/tasks/bug_changelog_collector.go
@@ -51,7 +51,7 @@ func CollectBugChangelogs(taskCtx core.SubTaskContext) error {
return fmt.Errorf("failed to get latest tapd changelog record: %w", err)
}
if latestUpdated.Id > 0 {
- since = (*time.Time)(&latestUpdated.Created)
+ since = (*time.Time)(latestUpdated.Created)
incremental = true
}
}
diff --git a/plugins/tapd/tasks/bug_converter.go b/plugins/tapd/tasks/bug_converter.go
index deeea019..dfe6046f 100644
--- a/plugins/tapd/tasks/bug_converter.go
+++ b/plugins/tapd/tasks/bug_converter.go
@@ -61,9 +61,9 @@ func ConvertBug(taskCtx core.SubTaskContext) error {
EpicKey: toolL.EpicKey,
Type: "BUG",
Status: toolL.StdStatus,
- //ResolutionDate: (*time.Time)(&toolL.Resolved),
- //CreatedDate: (*time.Time)(&toolL.Created),
- //UpdatedDate: (*time.Time)(&toolL.Modified),
+ //ResolutionDate: (*time.Time)(toolL.Resolved),
+ //CreatedDate: (*time.Time)(toolL.Created),
+ //UpdatedDate: (*time.Time)(toolL.Modified),
ParentIssueId: IssueIdGen.Generate(toolL.ConnectionId, toolL.IssueId),
Priority: toolL.Priority,
CreatorId: UserIdGen.Generate(data.Connection.ID, toolL.WorkspaceId, toolL.Reporter),
diff --git a/plugins/tapd/tasks/bug_extractor.go b/plugins/tapd/tasks/bug_extractor.go
index 927aa75c..38e01244 100644
--- a/plugins/tapd/tasks/bug_extractor.go
+++ b/plugins/tapd/tasks/bug_extractor.go
@@ -99,8 +99,8 @@ func ExtractBugs(taskCtx core.SubTaskContext) error {
IterationId: toolL.IterationId,
WorkspaceId: toolL.WorkspaceId,
BugId: toolL.Id,
- ResolutionDate: *toolL.Resolved,
- BugCreatedDate: *toolL.Created,
+ ResolutionDate: toolL.Resolved,
+ BugCreatedDate: toolL.Created,
}
results = append(results, iterationBug)
}
diff --git a/plugins/tapd/tasks/story_changelog_collector.go b/plugins/tapd/tasks/story_changelog_collector.go
index 17c7622e..48c08b38 100644
--- a/plugins/tapd/tasks/story_changelog_collector.go
+++ b/plugins/tapd/tasks/story_changelog_collector.go
@@ -51,7 +51,7 @@ func CollectStoryChangelogs(taskCtx core.SubTaskContext) error {
return fmt.Errorf("failed to get latest tapd changelog record: %w", err)
}
if latestUpdated.Id > 0 {
- since = (*time.Time)(&latestUpdated.Created)
+ since = (*time.Time)(latestUpdated.Created)
incremental = true
}
}
diff --git a/plugins/tapd/tasks/story_extractor.go b/plugins/tapd/tasks/story_extractor.go
index 0067aec6..6136fb56 100644
--- a/plugins/tapd/tasks/story_extractor.go
+++ b/plugins/tapd/tasks/story_extractor.go
@@ -96,8 +96,8 @@ func ExtractStories(taskCtx core.SubTaskContext) error {
IterationId: toolL.IterationId,
StoryId: toolL.Id,
WorkspaceId: toolL.WorkspaceId,
- ResolutionDate: *toolL.Completed,
- StoryCreatedDate: *toolL.Created,
+ ResolutionDate: toolL.Completed,
+ StoryCreatedDate: toolL.Created,
}
results = append(results, iterationStory)
}
diff --git a/plugins/tapd/tasks/task_changelog_collector.go b/plugins/tapd/tasks/task_changelog_collector.go
index b9dbbfef..5e45e826 100644
--- a/plugins/tapd/tasks/task_changelog_collector.go
+++ b/plugins/tapd/tasks/task_changelog_collector.go
@@ -51,7 +51,7 @@ func CollectTaskChangelogs(taskCtx core.SubTaskContext) error {
return fmt.Errorf("failed to get latest tapd changelog record: %w", err)
}
if latestUpdated.Id > 0 {
- since = (*time.Time)(&latestUpdated.Created)
+ since = (*time.Time)(latestUpdated.Created)
incremental = true
}
}
diff --git a/plugins/tapd/tasks/task_extractor.go b/plugins/tapd/tasks/task_extractor.go
index bf7318e3..9cde9de1 100644
--- a/plugins/tapd/tasks/task_extractor.go
+++ b/plugins/tapd/tasks/task_extractor.go
@@ -84,8 +84,8 @@ func ExtractTasks(taskCtx core.SubTaskContext) error {
IterationId: toolL.IterationId,
TaskId: toolL.Id,
WorkspaceId: toolL.WorkspaceId,
- ResolutionDate: *toolL.Completed,
- TaskCreatedDate: *toolL.Created,
+ ResolutionDate: toolL.Completed,
+ TaskCreatedDate: toolL.Created,
}
results = append(results, iterationTask)
}