# Feature OP-2165 - [WP] Create new relation when copying work packages and child work packages

Project: OpenProject
Status: rejected
URL: https://community.openproject.org/work_packages/OP-2165

## Planning

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

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## 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 | Niels Lindenthal |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

**Preconditions**  
Work package module activated.  
Work package has child work package.

**Steps to reproduce**  
Go to the WP List and tick the Work Package (e.g. \# 1) and the child Work Package (e.g. \# 2)  
Rightclick on them and choose Copy  
Confirm the copy

**Actual behavior**  
Two new Workpackages are created (Workpackage (e.g. # 3) and child Work Package (e.g. # 4)). The parent of the child work package (<mention class="mention" data-id="4" data-type="work_package" data-text="#4">#4</mention> ) is the first parent work package(# 1). The relation is kept to the old work package!

**Expected behavior**  
The parent of the new child work package (\# 4) is the new parent work package (\# 3).  
The relation to the old work packages is removed and a new relation to the copyied work packages is created.

This easily allows to create templates and copy the a complete work package hirarchy with the same sub tasks.

Forum entrys about that Topic:  
<https://community.openproject.org/topics/1303?r=5030\#message-5030>
