# Feature AUTOWORK-224 - Workflows UX improvement: Select relevant roles and statuses

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

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Target versions | 17.3.0 |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List | RM Jira exit |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_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-232 | Bug | Workflow edit page subheader scrolls horizontally when tables are too wide | closed |  | 17.3.0 |  | Administration / Type/Variants and Workflows |

## Technical Details

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

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups | https://www.figma.com/design/LsJmLVlm0Nqrq32xMeFq9P/Workflow--new-?node-id=127-2311 |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Oliver Günther, Mir Bhatia |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

**As** an OpenProject admin that is new to the workflow configuration  
**I want to** select statuses relevant to my workflow  
**so that** I am not overwhelmed by statuses that are irrelevant to me

**Acceptance criteria**

  - When the user clicks on a type in the new Workflows index page, they are taken to a page for that Type, with the workflow table showing only statuses that are used.

  - The first role in the list is pre-selected.
    
      - The user can click the button to change the role. They will do so using a ActionMenu.
    
      - When the role is changed, the workflow table underneath is automatically refreshed to show values for that role.
    
      - If there are unsaved changes, the user must be given an opportunity to save them before continuing. This is described in <mention class="mention" data-id="72924" data-type="work_package" data-text="##72924">\#\#72924</mention>.

  - The "Show all statuses" checkbox at the top and the "Edit" button are removed.

  - There is a secondary button `+ Status` in the sub-header to add/remove additional statuses to the workflow table.
    
      - Clicking on the button will display a dialog with just one input:
        
          - Title: "Statuses"
        
          - Label: "Statuses enabled for this type"
        
          - The field allows you to add/remove types (similar to in Admin → Backlogs) with chips
            
              - Use the same autocompleter to add/remove types as on that page
        
          - Caption: "Add or remove statuses you would like to associate with this type. Removing a status will also delete the workflow associated with it."
        
          - Clicking on "Apply" will update the workflow table with the new list of statuses
        
          - If statuses were removed, a DangerDialog (simple warning, not confirmation) is displayed after clicking 'Apply':
            
              - Title: "Remove {n} statuses?"
            
              - Text: "Removing these statuses will make them unavailable to this type and delete existing workflows. Are you sure you want to proceed?"
            
              - Buttons:
                
                  - Cancel (secondary)
                
                  - Remove (danger)
    
      - All checkboxes of the added status are active (unsaved)
    
      - Reloading/switching roles/tabs will lose applied changes, unless the form was saved. Confirmation dialogs will be added for these cases in <mention class="mention" data-id="72924" data-type="work_package" data-text="##72924">\#\#72924</mention>.
    
      - Updating the selected statuses will preserve unsaved checkbox changes.

  - When the page is saved with one status completely unused (no checkboxes checked for its row/column), it is removed on save.

  - If a workflow is empty (i.e, no statuses have configurations), show an empty blankslate:
    
      - Title: "No status transitions configured"
    
      - Text: "Add statuses to start configuring workflows for this role"
    
      - Action: "+ Status" (secondary, triggers the same modal as the "+ Status button in the Sub-header)

  - The workflow table otherwise works as it did before

  - Specifications around the behaviour of the Save button and saving in general are addressed in <mention class="mention" data-id="72924" data-type="work_package" data-text="##72924">\#\#72924</mention> 

<br>
