# Feature OP-18388 - Add ‘Collapse Hierarchy’ Button to Show Only Top-Level Work Packages

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

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes | 1 |
| 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 | Modules and project features / Work packages, Modules and project features / Query and filter |
| 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** a user working with complex work breakdown structures  
**I want to** have a “Collapse hierarchy” button that folds all hierarchy levels  
**so that** I can quickly see only the top‑level work packages and get a high‑level overview.

**Acceptance criteria**

*   A clearly labeled button is available in the hierarchy view of work packages.
    
*   Clicking the button collapses all nested levels and shows only top‑level work packages.
    
*   If some work packages were previously expanded, they are all collapsed after using the button.
    
*   The current filtering, sorting, and search settings remain applied when the hierarchy is collapsed.
    
*   The button state is visually clear
    
*   The feature works consistently across supported browsers and screen sizes.
    

**Technical notes**

*   Implement a global “collapse all” action that sets all work package rows to their collapsed state.
    
*   Reuse existing expand/collapse logic for individual work packages where possible.
    
*   Ensure the feature performs efficiently for large hierarchies
    
*   Persist or reset the hierarchy state according to current product behavior (e.g., on page reload) to avoid unexpected UX changes.
    

**Permissions and visibility considerations**

*   _To whom is this feature visible?_
    
    *   All users who have permission to view the hierarchy / work package list.
        
*   _When is it not visible?_
    
    *   When the user does not have access to the hierarchy view.
        
    *   When there is no hierarchical structure (e.g., if all items are flat and there are no child work packages), the button may be disabled or hidden based on UX guidelines.
        

**Translation considerations**

*   _Key terms and phrases in the key languages_
    
    *   “Collapse hierarchy” (button label)
        
    *   “Collapse all hierarchy levels” (tooltip / description)
        
    *   “Top-level work packages”
        

**Out of scope**

*   Changes to the existing expand/collapse behavior of individual work packages.
    
*   Persisting user‑specific default hierarchy states beyond current product capabilities.
    
*   Any changes to permission models for viewing or editing work packages.
    

_Set the_ **To be informed/consulted teams** _field to include all teams necessary to be informed of the changes._
