# Feature OP-4621 - Visualize mutual exclusiveness of hierarchy mode and sorting

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-4621

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 8.1.0 |
| Sprint | 8.1.0 |
| Backlog bucket |  |
| Votes |  |
| 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 |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Accessibility | No |

## People

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

## Estimates and progress

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

## Description

To allow displaying all descendants successively within their respective layers, the hierarchy mode forces a sortation by parent. That sortation itself relies on having the complete path from each work package to its respective root work package stored within the database. That path is represented by the ids of each work package including the work package for which the path is stored.

This technical limitation results in limited possibilities for users to sort while having the hierarchy mode enabled. When the hierarchy mode is enabled, defining a sortation (e.g. subject) as the second sort criteria (the first, by parent, already exists because of the hierarchy mode) does not alter the results. Even worse, it is possible for the user to enable the hierarchy mode, but change the order of the sorting to first sort by a different criteria (e.g. subject) and then by parent. Doing this might result in having the desired result in the case where all results fit on a single page as the front end will go to great length to apply the hierarchy later on. But the results will be totally unpredictable and might even repeat themselves when more than one page of filter results exists.

To avoid confusing the user, the front end should visualize the mutual exclusiveness of hierarchy mode and sorting. When the hierarchy mode is enabled, no sorting should be selectable in the UI and vice versa. This would mean displaying the limitation in the:

  - work package columns 
  - the configuration modal
