# Feature AUTOWORK-77 - Switching the active type variant in a project with a preview

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

## 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

| ID | Subject | Type | Status | Assignee | Target versions | Spent time |
| --- | --- | --- | --- | --- | --- | --- |
| AUTOWORK-110 | Service to switch from one subtype to another in a project | Implementation | closed |  | 18.0.0 |  |
| AUTOWORK-147 | Implement services / dialog to preview changes when switching variants | Implementation | closed |  | 18.0.0 |  |
| AUTOWORK-179 | Changing the active type variant in a project | Implementation | closed |  | 18.0.0 |  |
| AUTOWORK-184 | Dialog/Page for variant switch preview | Feature | tested |  | 18.0.0 |  |

## 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 | 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 | David Friquet |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work | 18d 0h · Σ 36d 0h |
| Labor costs |  |

## Description

**As a** project administrator  
**I want to** be able to change sub-types and see exactly what will change before I switch my project's active variant  
**so that** I never change behavior or hide attribute values without understanding the impact.

## Background

We currently work with the assumption that only one sub-type can be active in a project. Currently changing the type of a work package requires that the new and the old type are active at the same time. Now, if we don't allow to have multiple sub-types active in a project, we cannot create that situation. If this is the case, we somehow need the option to switch between the active sub-type in a project. Switching between active sub-types will have effects on the work package `work_packages.type_id` , resulting in different workflows and active fields.

Changing the type of a work package currently does **not** delete `custom_values`. Values for fields the new variant does not include become hidden (not visible or editable), but the data remains and reappears if re-typed back. True deletion only happens through a separate, explicit purge, which is currently not implemented.

## Acceptance criteria

  - When I try to change the active variant, the system shows an impact preview before applying, including: <mention class="mention" data-id="77886" data-type="work_package" data-text="###FND-188" data-display-id="FND-188">\#\#\#FND-188</mention>
    
    1.  the number of existing work packages on the old member
    
    2.  the custom fields that will become hidden (with a count of work packages currently holding a value)
    
    3.  the custom fields that will become newly available (and within, new required fields),
    
    4.  any current statuses not present in the new variant's workflow;
    
    5.  Work packages whose current status is invalid under the new workflow are flagged in the preview; the status is kept rather than forced

  - Re-typing preserves all custom values; values for fields not in the new configuration are retained but hidden, and the preview states this <mention class="mention" data-id="78587" data-type="work_package" data-text="###FND-233" data-display-id="FND-233">\#\#\#FND-233</mention>

## Permissions and visibility considerations

  - **To whom is this feature visible?** Project members with `:manage_types`

  - **When is it not visible?** Feature flag turned off, without project type management rights

## Translation considerations

<br>

<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><thead class="op-uc-table--head"><tr class="op-uc-table--row"><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">English</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">German</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">French (verify)</p></th><th class="op-uc-table--cell op-uc-table--cell_head"><p class="op-uc-p">Spanish (verify)</p></th></tr></thead><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Change variant</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Variante ändern</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Changer de variante</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Cambiar la variante</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Impact preview</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Auswirkungen anzeigen</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Aperçu de l'impact</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Vista previa del impacto</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">These fields will be hidden</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Diese Felder werden ausgeblendet</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Ces champs seront masqués</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Estos campos se ocultarán</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Values are kept but no longer shown</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Werte bleiben erhalten, werden aber nicht mehr angezeigt</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Les valeurs sont conservées mais ne sont plus affichées</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Los valores se conservan pero ya no se muestran</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Newly available fields</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Neu verfügbare Felder</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Nouveaux champs disponibles</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Campos recién disponibles</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Re-type existing work packages</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Bestehende Arbeitspakete umtypisieren</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Recatégoriser les lots de travaux existants</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Recategorizar los paquetes de trabajo existentes</p></td></tr><tr class="op-uc-table--row"><td class="op-uc-table--cell"><p class="op-uc-p">Apply to new work packages only</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Nur auf neue Arbeitspakete anwenden</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Appliquer uniquement aux nouveaux lots de travaux</p></td><td class="op-uc-table--cell"><p class="op-uc-p">Aplicar solo a los nuevos paquetes de trabajo</p></td></tr></tbody></table></figure>

## Out of scope

  - Permanent deletion or purge of hidden custom values.

  - Forced status mapping or automatic transitions when the new workflow lacks a current status (first iteration keeps the status and warns)

  - Re-typing across different type roots
