# Bug OP-10586 - Attachments are assigned to the wrong Work Package

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 12.2.0 |
| Observed in versions |  |
| Sprint | 12.2.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

### Steps to reproduce

1.  Go to a work package table
2.  Click on &quot;+Create&quot; to create a work package in the split screen
3.  Fill in all necessary information
4.  Drag an image to the description
5.  Click on &quot;Save&quot;
6.  Click on &quot;+Create&quot; again --&gt; the create form opens again
7.  Scroll down to the attachments section

### What is the buggy behavior?

*   In the **second** work package there is already an attachment listed, although I did not upload one yet
    *   The attachment is the one from the ticket I created first.
*   When trying to save the second work package, I receive an error.
    *   The work package can only be saved, once I manually deleted the wrong attachment

<figure class="image op-uc-figure" style="width:75%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/34203/content"></div></figure>

*   Deleting the wrong attachment however leads to the image being lost in the first work package as well.

### What is the expected behavior?

1.  Attachments should only be uploaded to the correct work package

### Environment information

**OpenProject installation type**

*   [x] Hosted cloud edition
    *   [x] Community.openproject.org

**OpenProject version**

dev

**Browser**

*   [ ] Chrome
*   [ ] Firefox
*   [x] Safari
*   [ ] Mobile Safari
*   [ ] Other (please specify)

**Language**

German
