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

archives没有按年份倒序排序 #3157

Closed
longjuan opened this issue Jan 16, 2023 · 3 comments · Fixed by #3158
Closed

archives没有按年份倒序排序 #3157

longjuan opened this issue Jan 16, 2023 · 3 comments · Fixed by #3158
Assignees
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.
Milestone

Comments

@longjuan
Copy link
Member

longjuan commented Jan 16, 2023

是什么版本出现了此问题?

2.1.0

使用的什么数据库?

H2

使用的哪种方式部署?

Fat Jar

在线站点地址

No response

发生了什么?

归档的年份没有按年份倒序排序
image
image

原因是map.entrySet()没办法保证顺序
image

相关日志输出

No response

附加信息

No response

@ruibaby
Copy link
Member

ruibaby commented Jan 16, 2023

/kind improvement
/area core

@longjuan 要来提个 PR 吗?

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. area/core Issues or PRs related to the Halo Core labels Jan 16, 2023
@longjuan
Copy link
Member Author

@longjuan 要来提个 PR 吗?

我来吧
/assign

f2c-ci-robot bot pushed a commit that referenced this issue Jan 17, 2023
)

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

#### What type of PR is this?
/kind improvement
/area core
<!--
添加其中一个类别:
Add one of the following kinds:

/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement

适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:

/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:
Display archives in reverse chronological order.
#### Which issue(s) this PR fixes:

<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.

用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #3157

#### Special notes for your reviewer:
改进前:
![image](https://user-images.githubusercontent.com/28662535/212591149-68683249-76a4-4cba-8b02-9a58901709ec.png)

改进后:
![image](https://user-images.githubusercontent.com/28662535/212591100-2c155cb7-832f-4c19-96bd-b783810138ce.png)

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

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
归档以年份降序排序
```
@JohnNiang
Copy link
Member

/milestone 2.2.x

@f2c-ci-robot f2c-ci-robot bot added this to the 2.2.x milestone Jan 17, 2023
@JohnNiang JohnNiang modified the milestones: 2.2.x, 2.2.0 Jan 17, 2023
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants