Skip to content

Exclusive Label SortOrder Not Respected in Pull Requests #35740

@pascallauer

Description

@pascallauer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions