# Bug OP-18695 - Inaccurate/incomplete error messaging when removing a WP type from a project

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Administration, Modules and project features / Work packages |
| Target versions | 17.7.0 |
| Observed in versions | 17.0.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.0.x |
| 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 | Oliver Günther |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Login as an admin

2.  Activate a WP type A in a project

3.  Create WPs with that type A in project B

4.  a. In Project settings \> Work package, untick the WP type A and save
    
    b. In Administration \>  Work packages \> Type A, go to the Projects tab, untick project B

### What is the buggy behaviour?

  - Scenario 4a: Error message is missing a hyperlink to a WP containing the WP types the user is trying to remove

  - Scenario 4b: Success message is shown even if the update actually failed

### What is the expected behaviour?

1.  In both scenarios:
    
    Show error message  
     'Unable to deactivate type {type name} because it's still in use by \<work packages\>'   
    with a hyperlink on work packages linking to the WPs of the type the user is trying to deactivate

### 

### Screenshots and other files

4a

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/918367/content"> 4b <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/918368/content">

### Environment information

**OpenProject version**

Core build

[d92a9f5ba4935c649ce109bb42077dd2151365a8](https://github.com/opf/openproject/commits/d92a9f5ba4935c649ce109bb42077dd2151365a8)

Product version

[2f57a70dd455e8ac9de62708487287ff0e3e69a1](https://github.com/opf/saas-openproject/commits/2f57a70dd455e8ac9de62708487287ff0e3e69a1)

Core version

OpenProject 17.1.0

**Browser**

- [ ] Chrome
- [x] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [x] Windows
- [ ] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [ ] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)
