Sorting order of milestones changed in 1.24.3 release (docker) #14825

Open
opened 2025-11-02 11:23:49 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @akc42 on GitHub (Aug 1, 2025).

Description

I'm using the docker version of Gitea on a Synology NAS. I was recently informed of an update which I installed. After the update (version 1.24.3) milestones with a due date now sort after milestones without a due date (on the default earliest first sort order), whereas before that, they (naturally in my view) sorted before.

In my (private) repository I have the upcoming milestones with due dates, and others more ephemeral milestones without due dates. It is annoying that these now sort first.

I created a demo repository at https://gitea.com/akc42/Test/milestones?sort=closestduedate&state=open&q=

Gitea Version

1.24.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Docker on a Synology NAS

How are you running Gitea?

Installed via Synology Packages.

Database

SQLite

Originally created by @akc42 on GitHub (Aug 1, 2025). ### Description I'm using the docker version of Gitea on a Synology NAS. I was recently informed of an update which I installed. After the update (version 1.24.3) milestones with a due date now sort after milestones without a due date (on the default earliest first sort order), whereas before that, they (naturally in my view) sorted before. In my (private) repository I have the upcoming milestones with due dates, and others more ephemeral milestones without due dates. It is annoying that these now sort first. I created a demo repository at https://gitea.com/akc42/Test/milestones?sort=closestduedate&state=open&q= ### Gitea Version 1.24.3 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Docker on a Synology NAS ### How are you running Gitea? Installed via Synology Packages. ### Database SQLite
GiteaMirror added the topic/uitype/bug labels 2025-11-02 11:23:49 -06:00
Author
Owner

@lunny commented on GitHub (Aug 1, 2025):

The releases are ordered by "created_unix DESC, id DESC", and as far as I know, this ordering hasn’t changed recently.

OK. This is the current ordering logic, and it hasn’t changed recently. But I agree—it doesn’t look ideal.

func (opts FindMilestoneOptions) ToOrders() string {
	switch opts.SortType {
	case "furthestduedate":
		return "deadline_unix DESC"
	case "leastcomplete":
		return "completeness ASC"
	case "mostcomplete":
		return "completeness DESC"
	case "leastissues":
		return "num_issues ASC"
	case "mostissues":
		return "num_issues DESC"
	case "id":
		return "id ASC"
	case "name":
		return "name DESC"
	default:
		return "deadline_unix ASC, name ASC"
	}
}
@lunny commented on GitHub (Aug 1, 2025): ~The releases are ordered by "created_unix DESC, id DESC", and as far as I know, this ordering hasn’t changed recently.~ OK. This is the current ordering logic, and it hasn’t changed recently. But I agree—it doesn’t look ideal. ``` func (opts FindMilestoneOptions) ToOrders() string { switch opts.SortType { case "furthestduedate": return "deadline_unix DESC" case "leastcomplete": return "completeness ASC" case "mostcomplete": return "completeness DESC" case "leastissues": return "num_issues ASC" case "mostissues": return "num_issues DESC" case "id": return "id ASC" case "name": return "name DESC" default: return "deadline_unix ASC, name ASC" } } ```
Author
Owner

@akc42 commented on GitHub (Aug 1, 2025):

@lunny well that is wrong, since the ordering in the sort tab says "Earliest Due date" or "Latest Due Date"

Note also, the same change has occurred when in an specific issue, you click on the Milestone list on the right hand side and the list of milestones there also now list the milestones without due dates ahead of those with due dates, where as before it didn't

@akc42 commented on GitHub (Aug 1, 2025): @lunny well that is wrong, since the ordering in the sort tab says "Earliest _Due_ date" or "Latest _Due_ Date" Note also, the same change has occurred when in an specific issue, you click on the Milestone list on the right hand side and the list of milestones there also now list the milestones without due dates ahead of those with due dates, where as before it didn't
Author
Owner

@lunny commented on GitHub (Aug 1, 2025):

I sent a pull request #35200 which will consider non-due date milestones when sorting.

@lunny commented on GitHub (Aug 1, 2025): I sent a pull request #35200 which will consider non-due date milestones when sorting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14825