diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-14 18:29:22 +0800 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2020-01-14 10:29:22 +0000 |
commit | 7f869c061eadddcb05cd8bc54a54a0b7f640aa59 (patch) | |
tree | 86693bd079b985eb4d412d5f829aa5097a3a91c0 /modules/migrations/gitea.go | |
parent | 2677d071f911fb91f382acfedaedc251bd807f70 (diff) | |
download | gitea-7f869c061eadddcb05cd8bc54a54a0b7f640aa59.tar.gz gitea-7f869c061eadddcb05cd8bc54a54a0b7f640aa59.zip |
Fix missing updated time on migrated issues and comments (#9744)
* Fix missing updated time on migrated issues and comments
* Fix testing and missing updated on migrating pullrequest
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Diffstat (limited to 'modules/migrations/gitea.go')
-rw-r--r-- | modules/migrations/gitea.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/migrations/gitea.go b/modules/migrations/gitea.go index 88414e6cad..0cffd60e84 100644 --- a/modules/migrations/gitea.go +++ b/modules/migrations/gitea.go @@ -334,6 +334,7 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error { MilestoneID: milestoneID, Labels: labels, CreatedUnix: timeutil.TimeStamp(issue.Created.Unix()), + UpdatedUnix: timeutil.TimeStamp(issue.Updated.Unix()), } userid, ok := g.userMap[issue.PosterID] @@ -408,6 +409,7 @@ func (g *GiteaLocalUploader) CreateComments(comments ...*base.Comment) error { Type: models.CommentTypeComment, Content: comment.Content, CreatedUnix: timeutil.TimeStamp(comment.Created.Unix()), + UpdatedUnix: timeutil.TimeStamp(comment.Updated.Unix()), } if userid > 0 { @@ -576,6 +578,7 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*models.PullR IsLocked: pr.IsLocked, Labels: labels, CreatedUnix: timeutil.TimeStamp(pr.Created.Unix()), + UpdatedUnix: timeutil.TimeStamp(pr.Updated.Unix()), } userid, ok := g.userMap[pr.PosterID] |