# Bug OP-7437 - Drag and drop parent/child

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date | 2020-08-11 –  |
| Priority | High |
| Module |  |
| Target versions | 11.0.0 |
| Observed in versions | 10.6.0 |
| Sprint | 11.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 10.6.x |
| 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

### TODO

*   [x] Problem: now when dropped into a collapsed group, it is placed on its parent, but the blue line is shown below the collapsed group which is confusing.
*   [x] Dropping a wp after the last children of a nested group includes the wp into the group

### **Environment**:

Your OpenProject Version: 10.6.5

Ubuntu 20.0.4 / Safari / Language: English

### **Steps to reproduce:**

1.  Go to a work package.
2.  Create multiple Phases.
3.  Create multiple Tasks (at least two).
4.  Order them so that one Phase is first, then multiple tasks, then Phase.
5.  Assign a phase as the first tasks parents.
6.  Close the hierarchy of the Phase by clicking the arrow.
7.  Drag the second Phase to be ordered as the second item.
8.  The second phase gets places inside the first phase

### **Actual Behavior**

Dragging a phase below another phase with children results in it becoming a child even when the hierarchy is closed.

### **Expected Behavior**

Phase should not become a child of another phase when the parent/child hierarchy is not expanded. It should be placed below it in the list order.
