# Bug COMMS-717 - Moving work packages after switching to semantic and back should not lead to errors

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

## Open points

_No work packages_

## Details

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

## People

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

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  I switched my instance to semantic IDs and did some testing

2.  I switched back to classic because I wanted to test the back conversion job

3.  I moved a ticket from one project to another, because I wanted then to test that this is fixed by the conversion job when I switch semantic back on (which I intended to do in the next step...)

4.  I was getting `PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_work_packages_on_project_id_and_sequence_number" DETAIL: Key (project_id, sequence_number)=(1, 1) already exists.`

### What is the buggy behavior?

In classic mode, when moving work packages with a sequence number to another project which already has a work package with the same sequence number, the sequence number is not replaced and therefore we're getting an uniqueness constraint error.

### What is the expected behavior?

Moving work packages should work

###
