Repository list not sorted #13705

Closed
opened 2025-11-02 10:50:55 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @Sirherobrine23 on GitHub (Nov 13, 2024).

Description

This listing error has been there since 1.22.2, even selecting to list with the last changed is not returned, the list returns as if it had been selected for the list in the order of new first

Gitea Version

0aedb03996

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image

image

Git Version

2.45.2

Operating System

Debian sid

How are you running Gitea?

Custom docker image

Database

PostgreSQL

Originally created by @Sirherobrine23 on GitHub (Nov 13, 2024). ### Description This listing error has been there since 1.22.2, even selecting to list with the last changed is not returned, the list returns as if it had been selected for the list in the order of new first ### Gitea Version 0aedb03996d7bdce88b1f0086151f8778b10c1a4 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots ![image](https://github.com/user-attachments/assets/b68a4d58-dc47-4dbe-b5bb-bbbb2bb8bd70) ![image](https://github.com/user-attachments/assets/119a4c53-5e2c-48a6-a329-5e8de7964d9f) ### Git Version 2.45.2 ### Operating System Debian sid ### How are you running Gitea? Custom docker image ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 10:50:55 -06:00
Author
Owner

@Zettat123 commented on GitHub (Nov 14, 2024):

The default sort type is recentupdate
9880c1372e/custom/conf/app.example.ini (L1300-L1302)

But there is not a recentupdate in OrderByFlatMap
9880c1372e/models/repo/search.go (L36-L52)

As a result, alphabetically is used
9880c1372e/models/repo/repo_list.go (L593-L595)

@Zettat123 commented on GitHub (Nov 14, 2024): The default sort type is `recentupdate` https://github.com/go-gitea/gitea/blob/9880c1372e6db6dd9cf28ae240af6bd52164459d/custom/conf/app.example.ini#L1300-L1302 But there is not a `recentupdate` in `OrderByFlatMap` https://github.com/go-gitea/gitea/blob/9880c1372e6db6dd9cf28ae240af6bd52164459d/models/repo/search.go#L36-L52 As a result, `alphabetically` is used https://github.com/go-gitea/gitea/blob/9880c1372e6db6dd9cf28ae240af6bd52164459d/models/repo/repo_list.go#L593-L595
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13705