# Feature OP-5395 - Control sort order of work package table when using "Group by" display setting

Project: OpenProject
Status: new
URL: https://community.openproject.org/work_packages/OP-5395

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes | 3 |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

As an OpenProject user, I want to only control the sort order of a work package table when using the &quot;group by&quot; display setting so that the items can be sorted in a more natural order.

## Detailed explanation

It seems that when using the &quot;Group by&quot; setting, there is no possibility to set the sort order of the groups. For example, if I group by version, it always lists the versions in reverse alphabetical order, which is not very useful if I am trying to organize the items by sprint, since the natural order would be &quot;Sprint 1, Sprint 2,...&quot;.

See screenshot for example.

A similar issue exists when using the Hierarchy display setting, but in this case it sorts by ID (ascending). It would be nice to control this sort order as well, for example, by Start date.

## Acceptance criteria

In the work package table, when the &quot;group by&quot; display setting is used and a user-selected &quot;sort by&quot; attribute is chosen, the items should be sorted according to the sort by criteria.

## Current behavior

The items are sorted in reverse alphabetical order for the chosen &quot;group by&quot; setting (see screenshot), i.e. &quot;Sprint 4, Sprint 3, Sprint 2...&quot;

![](/api/v3/attachments/15022/content)
