# Bug OP-19878 - Cannot assign WP types to projects properly

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Administration / Work package administration |
| Target versions | 17.8.1 |
| Observed in versions |  |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

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

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### 

### Steps to reproduce

*Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?). Example:*

1.  Create a new type (when you have a tree of projects)

2.  Assign the WP type to a few project leafs (but not all). Save

3.  Try to assign it to the parent. Save... it saves, but the checkmark does not appear

4.  As a workaround I enabled it for all projects (it worked)

5.  Click on "enable for all projects" switch. It errors now.

### What is the buggy behavior?

1.  *Cannot assign WP type to parent project, after some leafs (not all) are enabled*

2.  *Enabling it for all projects work, but then you can never disable it again*

### What is the expected behavior?

*Enabling WP type for project hierarchies used to work and should continue to work*

### **Logs**

**This log is from the error (disabling the "enable for all projects" wp type).**

``` text
web-1         | E, [2026-08-10T06:58:38.020847 #112] ERROR -- : [168f1c64-a897-490e-b444-fadc50f783ac] user=8 Missing template work_package_types/projects_tab/edit, work_package_types/base_
tab/edit, application/edit with {locale: [:en], formats: [:turbo_stream], variants: [], handlers: [:raw, :erb, :html, :builder, :ruby]}.
web-1         |                                                                                     
web-1         | Searched in:                                                                        
web-1         |   * "/app/app/views"                                                                
web-1         |   * "/app/modules/bim/app/views"                                                    
web-1         |   * "/app/modules/documents/app/views" 
web-1         |   * "/app/modules/wikis/app/views"                                                  
web-1         |   * "/app/modules/storages/app/views"        
web-1         |   * "/app/modules/resource_management/app/views"
web-1         |   * "/app/modules/calendar/app/views"          
web-1         |   * "/app/modules/gantt/app/views"                                                  
web-1         |   * "/app/modules/team_planner/app/views"
web-1         |   * "/app/modules/meeting/app/views"                  
web-1         |   * "/app/modules/budgets/app/views"
web-1         |   * "/app/modules/overviews/app/views"
web-1         |   * "/app/modules/boards/app/views"   
web-1         |   * "/app/modules/my_page/app/views"
web-1         |   * "/app/modules/job_status/app/views"
web-1         |   * "/app/modules/recaptcha/app/views"     
web-1         |   * "/app/modules/ldap_departments/app/views"
web-1         |   * "/app/modules/ldap_groups/app/views" 
web-1         |   * "/app/modules/gitlab_integration/app/views"                      
web-1         |   * "/app/modules/github_integration/app/views"                   
web-1         |   * "/app/modules/webhooks/app/views"                             
web-1         |   * "/app/modules/two_factor_authentication/app/views"            
web-1         |   * "/app/modules/avatars/app/views"                               
web-1         |   * "/app/modules/backlogs/app/views"                                                                                                                                                   
web-1         |   * "/app/modules/reporting/app/views"                                  
web-1         |   * "/app/modules/costs/app/views"                                                  
web-1         |   * "/app/modules/xls_export/app/views"                                 
web-1         |   * "/app/modules/openid_connect/app/views"
web-1         |   * "/app/modules/auth_saml/app/views"                                                                                                                                                  web-1         |   * "/app/modules/auth_plugins/app/views"                                                                                                                                               
web-1         |   * "/app/vendor/bundle/ruby/4.0.0/gems/turbo-rails-2.0.23/app/views"                                                                                                                   web-1         |   * "/app/vendor/bundle/ruby/4.0.0/gems/lookbook-2.3.14/app/views"                                                                                                                      web-1         |   * "/app/vendor/bundle/ruby/4.0.0/gems/good_job-4.19.1/app/views"                                                                                                                      web-1         |   * "/app/vendor/bundle/ruby/4.0.0/gems/scimitar-2.15.0/app/views"                                                                                                                      web-1         |   * "/app/vendor/bundle/ruby/4.0.0/gems/doorkeeper-5.9.3/app/views"                                                                                                                     web-1         |   * "/app/vendor/bundle/ruby/4.0.0/gems/openproject-primer_view_components-0.91.1/app/views"                                                                                            web-1         |   * "/app/vendor/bundle/ruby/4.0.0/gems/view_component-4.12.0/app/views"                                                                                                                web-1         |   * "/app/vendor/bundle/ruby/4.0.0/gems/actiontext-8.1.3.1/app/views"                                                                                                                   web-1         |   * "/app/vendor/bundle/ruby/4.0.0/gems/actionmailbox-8.1.3.1/app/views"                                                                                                                web-1         | : Missing template work_package_types/projects_tab/edit, work_package_types/base_tab/edit, application/edit with {locale: [:en], formats: [:turbo_stream], variants: [], handlers: [:raw, :erb, :html, :builder, :ruby]}.  
```

### Screenshots and other files

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/923555/content">

Could not enable it for parent before:  
<img class="image_resized op-uc-image op-uc-image_inline" style="width:383px;" src="/api/v3/attachments/923556/content">

### Environment information

*self hosted Ubuntu, version 17.7.0 and 17.7.1*
