# Feature AUTOWORK-281 - Allow deletion of types if they are active in a project, but not used in work packages

Project: Stream Workflows & Automations
Status: tested
URL: https://community.openproject.org/work_packages/AUTOWORK-281

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 18.0.0 |
| Sprint |  |
| Backlog bucket |  |
| 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

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| AUTOWORK-337 | Bug | Missing danger dialog when user wants to delete an unused type variant | tested |  | 18.0.0 |  | Administration / Type/Variants and Workflows |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Administration / Type/Variants and Workflows |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan | Community (COM) |

## 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 | Oliver Günther |
| Developers | Oliver Günther, OP Dev Sirius Team |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

Currently, types cannot be deleted if they are active in any projects. This is correct if work packages are still in place (and we warn about them, allowing users to show the work packages and delete/edit them).

When the type is active in projects, but not actively in use, the deletion silently failed (the bug Sonita/Cécile saw). Rather than just adding an error flash message in this case, we want to inform users and let them confirm the deletion instead

**Acceptance criteria**

*   If a type is active in a project, but no work packages exists, and the user tries to delete them
    
*   A DangerDialog (no confirmation) is shown, listing the projects that will have the type removed.
    

<img class="image_resized op-uc-image op-uc-image_inline" style="width:358px;" src="/api/v3/attachments/924579/content">

<br>
