# Bug COMMS-1041 - Deletion state missing from journal timeline when a target version that was previously assigned to a work package is deleted from the database

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 17.9.0 |
| Observed in versions | 17.8.0 |
| Sprint | Sprint 16 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.8.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Kabiru Mwenja |
| Product manager |  |
| Developers | Kabiru Mwenja |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

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

## Description

### Steps to reproduce

1.  Enable the multiple target versions feature and create versions v1, v2, v3 in a project

2.  Open a work package and set its target versions to v1, v2, v3

3.  Edit the work package again and remove v3, so the target versions are v1, v2

4.  Open the version settings and delete v3 (it is no longer assigned to any work package, so deletion is allowed)

5.  Reload the work package and look at its Activity tab

### What is the buggy behavior?

The journal entries lose every trace of v3 once it is deleted:

  - "Target versions set to v1, v2, v3" is displayed as "Target versions set to v1, v2"

  - "Target versions changed from v1, v2, v3 to v1, v2" is displayed as "Target versions changed from v1, v2 to v1, v2", a change with no visible difference

The deleted version's id is still stored in the journal snapshot; only the rendering drops it.

### What is the expected behavior?

1.  The journal keeps a placeholder in the deleted version's position, the same way custom field journals show "(deleted option)": "Target versions set to v1, v2, (deleted version)" and "Target versions changed from v1, v2, (deleted version) to v1, v2"

2.  Optional follow-up: render only the difference instead of the full before/after lists, e.g. "added v3" / "removed v3" <mention class="mention" data-id="80414" data-type="work_package" data-text="###COMMS-1042" data-display-id="COMMS-1042">\#\#\#COMMS-1042</mention>

### Screenshots and other files

Before deleting v3:

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

After deleting v3 (v3 missing from both journal entries):

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/924790/content"></div></figure>
