# Feature AUTOWORK-314 - Handle deletion of named workflows 

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

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Low |
| 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

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| 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 | Mir Bhatia |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

**Acceptance criteria**

  - Deleting an unused workflow should be easy with a basic confirmation

  - When trying to delete a named workflow that is still in-use
    
      - **Allow deletion** but first show a Danger Confirmation Dialog to:
        
          - warn the admin that the workflow is being used
        
          - show ist of types/variants using the workflow, and 
        
          - let admins select a *new* workflow to replace the current one with

  - Use the following copy.

**Dialog 1: Workflow not in use (basic danger dialog)**

  - Title: "Delete workflow {workflow name}?"

  - Body: "This workflow will be permanently deleted. This action is not reversible."

  - Buttons:
    
      - Cancel (secondary)
    
      - Delete workflow (danger)

**Dialog 2: Workflow in use (danger confirmation dialog)**

  - Title: "Delete workflow {workflow name}?"

  - Body: "This workflow is currently used by {n} types and variants. Please select a new workflow to replace it with."

  - Content slot:   
    *{list of types and variants using the current workflow*  
    \- *xyz*  
    \- *yxz*  
    \- *xyz}*

  - Select dropdown (offering a list of available workflows) with:
    
      - Label: "Replace with workflow"
    
      - Placeholder text: "Select a workflow"
    
      - Caption: "The selected workflow will be applied to all types and variants listed above."

  - Checkbox: "I understand that this action is not reversible."

  - Buttons:
    
      - Cancel (secondary)
    
      - Delete workflow (danger)

<br>
