# Feature AUTOWORK-180 - Update the project selector dialog for adding projects to type variants

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

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Product Backlog |
| 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 | Administration / Type/Variants and Workflows |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups | https://www.figma.com/design/juRCMvT1qnei6PCOjKEp0y/Project-Selector?node-id=0-1 |
| 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 | OP Dev Dream Team |
| 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

Update the Project selector dialog such that:

  - Use the 'XLarge' variant, with a large header.

  - Extend the FilterableTreeView component with an optional quick filter slot with:
    
      - a search icon button that turns into a full search input on click
    
      - a "Variants" dropdown
        
          - This behaves the same as as the Backlogs selector in the Backlogs module:
            
              - On click, it shows a SelectPanel component similar to the backlog select as implemented in <mention class="mention" data-id="73611" data-type="work_package" data-text="##AGILE-176" data-display-id="AGILE-176">\#\#AGILE-176</mention>
                
                  - When nothing is selected, it filters to show all variants and the label says "All variants"
                
                  - When items are selected, it filters to show only those and the label says "Variants" with a counter with the number of variants selected

  - Show the "Include sub-items" checkbox
    
      - *Note: This will select all sub-items, even if they are filtered out. This is correct behaviour. The counter on the 'Add' button will indicate how many total items are selected.*

  - Outside of the FilterableTreeView, in the footer of the modal:
    
      - These use the component [Check All with custom buttons](https://qa.openproject-edge.com/lookbook/inspect/OpenProject/Common/check_all/with_custom_buttons?_display=%257B%257D).
    
      - Option labels: "Select all" | "Unselect All"
    
      - These only act upon the filtered options

  - The primary button on the dialog "Add" has a counter that shows how many *new* projects are selected to be added; projects that were already on the list (and are therefore disabled) will not go towards the count.
    
      - *Note to devs: Pavel implemented something like this already for the Jira Migrator. Please consult him so we use the same approach.*

#### Places the component can be used

Once ready, this component can be used to replace project selection in a number of other places:

  - Administration → Custom fields → {A custom field} → Projects tab

  - Administration → Projects → Project attributes → {A project attributes} → Projects tab

  - Administration → Files → External file storages → {A file storage} → Projects tab

  - ...

#### 

#### Mockups

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

<br>
