# Feature OP-17934 - Fixed work breakdown structure (WBS) hierarchy with reparenting protection in all views

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

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes | 2 |
| 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** a project admin  
**I want to** enforce a &quot;hierarchy lock&quot; on project level on a fixed structure LP → AP → T (parent - child - grandchild) and prevent reparenting across hierarchy boundaries consistently in all modules and views (WP list, boards, Gantt chart, etc.)  
**so that** planning, procurement, billing and reporting can be kept stable:&nbsp;

*   fewer structural errors, more stable cost control and document links.
    
*   Particularly valuable for construction/engineering, where LP/AP/T chains form the basis for procurement, invoicing and cash flow.
    

**Terminology (WBS)**  
• LP = top level  
• AP = child of LP  
• T = child of AP

**Motivation**

Work packages can currently be easily moved ‘out of context’ (drag &amp; drop, bulk edit, boards, Gantt, lists). This is risky for construction/renovation projects with strict WBS: ‘Tasks (T)’ may only exist within their work package (WP), and WPs may only exist within the service phase (LP). Reparenting destroys dependencies, controlling references (DIN-276, KG), document links and responsibilities.

**Acceptance criteria**

• AK1: In boards, a card move that would change the parent blocks the action.  
• AK2: In Gantt, a task cannot be dragged under another AP/LP.  
• AK3: In lists, the ‘Parent’ field is read-only, bulk update is disabled.  
• AK4: When creating, the allowed parent type is enforced.  
• AK5: API calls with an invalid parent return 422.  
• AK6: Only roles with the ‘Unlock hierarchy’ right can change the flag.  
• AK7: Audit report documents changes.  
• AK8: Accessibility: Disabled drop zones are marked with an ARIA hint.

**Technical notes**

**Permissions and visibility considerations**

*   As project manager, I would like to lock the WBS hierarchy across the entire project so that tasks/APs are not accidentally moved to other parents.
    
*   As the person responsible for the AP, I am allowed to freely plan tasks within ‘my’ AP (dates/status), but not move them to another AP.
    
*   As PMO/admin, I can selectively lift the lock (for a limited time) in order to carry out controlled restructuring (with audit trail).
    

**Scope**

1\. New project setting: ‘Hierarchy Lock (LP→AP→T)’ = ON/OFF (+ optional ‘Temporarily unlock until &lt;date/time&gt;’).  
2\. Reparenting rules (enforced):  
  – T may only have parent AP; AP may only have parent LP.  
  – Moving a T to another AP is blocked (error message with explanation).  
  – Moving an AP to another LP is blocked.  
3\. UI enforcement in all views (boards, Gantt, lists, bulk edit, create flows).  
4\. API/backend validation with error code \`hierarchy\_violation\`.  
5\. Rights &amp; audit: New right ‘Unlock hierarchy’, audit trail upon activation/deactivation.

<br>
