Exclusive Label SortOrder Not Respected in Pull Requests #15049

Open
opened 2025-11-02 11:28:57 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @pascallauer on GitHub (Oct 24, 2025).

Description

When creating a label in the organization scope, the UI allows specifying a Sort Order that is intended to determine the order of exclusive labels within the same scope.

As shown in the attached screenshot, I created four labels in the same exclusive scope, all marked as exclusive. However, in a pull request, while the sorting number is displayed behind the label text, the labels themselves are not sorted according to the specified order.

Additionally, when creating labels via the API, there is currently no way to set this Sort Order.

It would be very helpful for consistency if the exclusive order property (exclusive_order) were exposed in the API as well, so that the same sorting behavior could be applied programmatically.

Gitea Version

1.24.6

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Organisation Labels
Image

PullRequest
Image

Git Version

2.46.1

Operating System

Microsoft Windows Server 2022 Standard

How are you running Gitea?

Official Download: gitea-1.24.6-gogit-windows-4.0-amd64

Database

PostgreSQL

Originally created by @pascallauer on GitHub (Oct 24, 2025). ### Description When creating a label in the organization scope, the UI allows specifying a Sort Order that is intended to determine the order of exclusive labels within the same scope. As shown in the attached screenshot, I created four labels in the same exclusive scope, all marked as exclusive. However, in a pull request, while the sorting number is displayed behind the label text, the labels themselves are not sorted according to the specified order. Additionally, when creating labels via the API, there is currently no way to set this Sort Order. It would be very helpful for consistency if the exclusive order property (exclusive_order) were exposed in the API as well, so that the same sorting behavior could be applied programmatically. ### Gitea Version 1.24.6 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots Organisation Labels <img width="1058" height="276" alt="Image" src="https://github.com/user-attachments/assets/4f885aea-c9af-47ae-a705-796cf75a941a" /> PullRequest <img width="300" height="430" alt="Image" src="https://github.com/user-attachments/assets/18279d1b-84bf-40aa-99a9-d9d032b8c6e8" /> ### Git Version 2.46.1 ### Operating System Microsoft Windows Server 2022 Standard ### How are you running Gitea? Official Download: gitea-1.24.6-gogit-windows-4.0-amd64 ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 11:28:57 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Oct 24, 2025):

Duplicate issues priority not ordered by default #34705, no one works on it yet.

@wxiaoguang commented on GitHub (Oct 24, 2025): Duplicate issues priority not ordered by default #34705, no one works on it yet.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15049