# Feature RESMA-102 - Support sub-projects in project-scoped resource planners

Project: Stream Resource Management
Status: new
URL: https://community.openproject.org/work_packages/RESMA-102

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Target versions | 18.1.0 |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Use cases

_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 / Resource management |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Build Number |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Accessibility | No |

## People

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

## Estimates and progress

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

## Description

**As** a resource manager doing planning in a project with subprojects  
**I want to** include the work packages of subprojects in my project&#x27;s resource planner  
**so that** I can plan and allocate the whole project tree from one planner instead of switching to a global planner

## Acceptance criteria

*   When creating or configuring a work package view in a project resource planner, I can choose to include subprojects. Default state is determined by the `display_subprojects_work_packages` setting.
    
*   With the option on, the list and timeline views show the work packages of all subprojects that have Resource management enabled and that I can see. For the work packages coming from subprojects, the project is shown before the subject, as in global planners.
    
*   I can create allocations on subproject work packages from the planner: by selecting a date range on the timeline row, through &quot;Allocate&quot; in the sub header, and from &quot;See allocations&quot;.
    
*   The work package picker in the allocation dialog offers work packages of the subprojects as well.
    
*   The assignee picker offers the members of the selected work package&#x27;s project.
    
*   I can edit and delete allocations on subproject work packages if I have the &quot;Allocate user resources&quot; permission in that subproject.
    
*   The dialogs open and refresh within the planner I started from.
    
*   The planner&#x27;s work package count includes the subproject work packages.
    
*   With the option off, the behavior stays as today: only the project&#x27;s own work packages.
    

## Technical notes

*   `include_subprojects` is currently always false for project planner views (`WorkPackageSelection#build_default_query`, `#apply_query_configuration`, migration `DisableSubprojectsInProjectPlannerViews`). The option would control this flag instead.
    
*   Everything below is scoped to the exact project today and needs to accept the project&#x27;s descendants:
    
    *   `BaseController#resolve_visible_entity`
        
    *   `ResourceAllocationsController#find_resource_allocation`
        
    *   `WorkPackageResourceAllocationsController#find_work_package`
        
    *   the `project_id` filter in `ResourceAllocations::Forms::WorkPackageForm`
        
*   `ResourceAllocation.editable_ids` restricts edits to the planner&#x27;s project and needs the same widening.
    
*   Edit and delete links are built with the planner&#x27;s project. Their routes must resolve allocations of subprojects, or the reopen flow (`resource_planner_view`, which uses `ResourcePlanner.visible_to(user, project)`) breaks.
    
*   The assignee picker filters by the planner&#x27;s project (`allocatable_in_project`). Memberships are not inherited by subprojects, so it has to follow the selected work package&#x27;s project.
    

## Permissions and visibility considerations

*   Subproject work packages are only shown if the user may view work packages in that subproject.
    
*   Allocating, editing and deleting require &quot;Allocate user resources&quot; in the work package&#x27;s own project, not in the parent project.
    
*   Subprojects without the Resource management module are never included.
    

## Translation considerations

*   &quot;Include subprojects&quot;: reuse the existing wording from the work package table&#x27;s subproject option.
    

## Out of scope

*   User views (card list, timeline) and the staffing view stay limited to the project&#x27;s own members and allocations.
    
*   Changing the global setting &quot;Display subprojects work packages on main projects by default&quot; or applying it to resource planners.
    
*   Grouping or filtering by subproject inside the planner.
