# Feature COMMS-845 - Make target_versions the canonical data source for all subsystems in OpenProject

Project: Stream Communicator
Status: closed
URL: https://community.openproject.org/work_packages/COMMS-845

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 17.8.0 |
| Sprint | Sprint 10 |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

| ID | Subject | Type | Status | Assignee | Target versions | Spent time |
| --- | --- | --- | --- | --- | --- | --- |
| COMMS-846 | Adjust WorkPackage contract/attribute setter/services to consistenly write the data to the correct place | Implementation | closed |  |  |  |
| COMMS-847 | Create data model for representing multiple versions | Implementation | closed |  |  |  |
| COMMS-848 | Adjust Roadmap module & Versions page to use values from target_versions | Implementation | closed |  | 17.7.0 |  |
| COMMS-849 | Adjust bulk edit of work packages to read/write target_versions | Implementation | closed |  | 17.7.0 |  |
| COMMS-850 | Adjust project copy to read/write target_versions | Implementation | closed |  |  |  |
| COMMS-852 | Adjust Journals (include target_versions) | Implementation | closed |  | 17.7.0 |  |
| COMMS-853 | Create a data migration to copy data from version to target_versions | Implementation | closed |  |  |  |
| COMMS-854 | Adjust seeders to properly create target_versions | Implementation | closed |  | 17.7.0 |  |
| COMMS-855 | Adjust handling of queries that reference work_package.version_id | Implementation | closed |  |  |  |
| COMMS-856 | Introduce filters for target_versions | Implementation | closed |  |  |  |
| COMMS-863 | Remove version relation from the WorkPackage model | Implementation | closed |  |  |  |
| COMMS-873 | Implement code-level Setting for enabling multiple versions | Implementation | closed |  | 17.7.0 |  |
| COMMS-877 | Adjust WorkPackage show UI to read/write target_versions | Implementation | closed |  | 17.7.0 |  |
| COMMS-878 | Adjust Type attribute_groups to read/write target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-883 | Adjust mailer views to read/write target_versions | Implementation | closed |  | 17.7.0 |  |
| COMMS-885 | Adjust MCP server to read target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-886 | Adjust WorkPackage list UI to read/write target_versions | Implementation | closed |  | 17.7.0 |  |
| COMMS-896 | Adjust work package move to read/write target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-897 | Adjust incoming e-mail handler to read/write target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-898 | Adjust demo query builder to use target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-899 | Preload target_versions in XLS exports | Implementation | closed |  | 17.8.0 |  |
| COMMS-900 | Adjust project copy to stop reading from version_id | Implementation | closed |  | 17.8.0 |  |
| COMMS-902 | Adjust guard version graph widget to read from target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-903 | Adjust sorting and grouping by target versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-911 | Make project parent change mechanism use target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-913 | Adjust eager loader checksum to use target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-915 | Adjust WorkPackage summary page to use target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-916 | Adjust Cost Reports to read from target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-917 | Adapt openproject-devkit to use target_versions | Implementation | closed | Oliver Günther |  |  |
| COMMS-918 | Make WP BaseContract correctly detect WPs with closed versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-920 | Adapt TokenPropertyMapper to use TargetVersions | Implementation | closed |  | 17.8.0 |  |
| COMMS-921 | Adjust version sharing to update target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-922 | Adjust the WP Version assignment logic to use target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-923 | Adjust WP reopen mechanism to use target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-929 | Adjust WorkPackage.group_by specs to use target_versions | Implementation | rejected |  |  |  |
| COMMS-931 | Adjust MigrateVersionSprintJournalsJob | Implementation | closed |  | 17.8.0 |  |
| COMMS-932 | Handle group by queries when the association is not present | Implementation | closed |  | 17.8.0 |  |
| COMMS-933 | Adjust foreign workpackage version validation (archiving projects) | Implementation | closed |  | 17.8.0 |  |
| COMMS-934 | Adjust WorkPackageAtTimeRepresenter with target_verisons | Implementation | closed |  | 17.8.0 |  |
| COMMS-937 | Adjust version's shared_via_workpackage scope | Implementation | closed |  | 17.8.0 |  |
| COMMS-939 | Adjust project archival to read from target_versions | Implementation | rejected | Bruno Pagno |  |  |
| COMMS-940 | Adjust WorkPackage.eager_load_for_validation to support target_versions | Implementation | closed |  | 17.8.0 |  |
| COMMS-941 | Adjust Version Boards frontend drag'n'drop to use target_versions | Implementation | closed |  |  |  |

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| COMMS-1041 | Bug | Deletion state missing from journal timeline when a target version that was previously assigned to a work package is deleted from the database | closed |  | 17.9.0 |  |  |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Bruno Pagno, Tom Hykel, Kabiru Mwenja |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

**As** an extensions maintainer  
**I want to** be able to adapt early  
**so that** I can support old and new versions on OpenProject

**Acceptance criteria**

*   Setting a version for a work package works as usual
    
*   Roadmap works as usual
    
*   Bulk edit correctly does bulk operations on versions
    
*   Copy of projects correctly copies work package versions
    
*   Version boards properly load and update versions
    
*   New installations come with versions prefilled as expected
    
*   Queries that reference versions stlill work properly
    
*   Filters for versions and target versions have the same behaviour
    

**Technical notes**

This is a large change under the hood, but the behaviour of the application should not change.

The goal is to replace version usage everywhere so that we can rely on target\_versions as being the single source of truth. This should not cause any product behaviour changes, only transform how we use data.

*   make sure write operations properly persist the data in target\_versions
    
*   make sure all subsystems read from target\_versions, and ignore work\_package.version
    

**Out of scope**

*   User facing changes (other than some filter keys/ids)
    

<br>

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

<br>
