Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

评论和回复增加允许修改的创建时间来兼容迁移顺序问题 #3330

Closed
guqing opened this issue Feb 17, 2023 · 1 comment · Fixed by #3341, halo-dev/console#874 or halo-sigs/plugin-migrate#14
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Milestone

Comments

@guqing
Copy link
Member

guqing commented Feb 17, 2023

Your current Halo version

2.2.1

Describe this feature

回复和评论为了迁移增加了 approvedTime 属性,主题端排序时应该按照 approvedTime 排序,而不是创建时间

Additional information

/kind improvement
/area core
/milestone 2.3.x
/priority critical-urgent

@f2c-ci-robot f2c-ci-robot bot added the kind/improvement Categorizes issue or PR as related to a improvement. label Feb 17, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.3.x milestone Feb 17, 2023
@f2c-ci-robot f2c-ci-robot bot added area/core Issues or PRs related to the Halo Core priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Feb 17, 2023
@guqing
Copy link
Member Author

guqing commented Feb 17, 2023

想了一下 当 A 先回复 B 后回复,先通过了 B 会造成错乱,因此迁移这个问题还是得在 spec 中添加一个允许修改的创建时间 creationTime

@guqing guqing changed the title 回复的排序时间应该按照 approvedTime 排序否则迁移后顺序是反的 评论和回复增加允许修改的创建时间来兼容迁移顺序问题 Feb 17, 2023
f2c-ci-robot bot pushed a commit that referenced this issue Feb 23, 2023
…ration issue (#3341)

#### What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x
/kind api-change

#### What this PR does / why we need it:
1. spec 中新增 creationTime
2. 旧数据的 spec.creationTime 默认等于 approvedTime
3. 按照 metadata.creationTimestamp 排序的使用 spec.creationTime 代替

how to test it?
1. 使用迁移插件迁移看评论和回复的排序是否正确
2. 使用评论插件创建评论和回复看顺序是否正确
#### Which issue(s) this PR fixes:
Fixes #3330

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
评论和回复新增创建时间以兼容迁移数据的排序
```
@ruibaby ruibaby modified the milestones: 2.3.x, 2.3.0 Feb 24, 2023
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this issue Feb 24, 2023
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

修改评论和回复的创建时间字段。适配:halo-dev/halo#3341

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#3330

#### Special notes for your reviewer:

None

#### Does this PR introduce a user-facing change?

```release-note
None
```
JohnNiang pushed a commit to JohnNiang/halo that referenced this issue Mar 2, 2023
…lo-dev/console#874)

#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

修改评论和回复的创建时间字段。适配:halo-dev#3341

#### Which issue(s) this PR fixes:

Fixes halo-dev#3330

#### Special notes for your reviewer:

None

#### Does this PR introduce a user-facing change?

```release-note
None
```
f2c-ci-robot bot pushed a commit to halo-sigs/plugin-migrate that referenced this issue Mar 30, 2023
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

增加迁移时评论和回复的创建时间字段。适配:halo-dev/halo#3341

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#3330

#### Special notes for your reviewer:

None

#### Does this PR introduce a user-facing change?

```release-note
None
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
2 participants