# Bug OP-2438 - Journal data is not removed upon work package deletion

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-2438

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 11.0.0 |
| Observed in versions |  |
| Sprint | 11.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

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

## Planning

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

## Costs

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

## Description

When deleting a work package, it’s associated data should be removed as well. Currently, the associated entries in the tables:

  - `work_packages_journals`
  - `attachable_journals`
  - `customizable_journals`

Are not removed upon the deletion of a work package leading to corrupt data. This bug is not visible to the user for now.

The same is probably true for wiki, messages and all other journalized data structures.
