Issue (Level 2) has Child Issues (Level 1) and Sub-Tasks (Level -1) - How?
Asked by Dino Murray:

We have a level 2 issue type Project, which has level 1 child issues (Epic) and level -1 subtasks, how is this possible?  
Our issue type hierarchy should prevent this, as the Project issue type is not a level 0 standard issue type, it is a level 2, above Epic at level 1 and sub-tasks at level -1.

Any idea's how this might have happened? No clues from audit history, as no indication that the sub-task or chid Epic issues were moved or had their issue type changed previously.

![Jira Issue.png](/t5/image/serverpage/image-id/342763i37ACE60463D91767/image-size/large?v=v2&px=999 "Jira Issue.png")


Answers:
author: Trudy Claspill
body: Hello [@Dino Murray](/t5/user/viewprofilepage/user-id/5572548)

Welcome to the Atlassian community.

You said you already checked that the sub-tasks have not been moved. That is one method that they could be associated with a level 2 issue.

Another way is if the level 2 issue type was not always at level 2 or was not always that issue type.

New issue types are initially created as level 0 - standard issue types. At that point a sub-task could be added to them.

After creating the issue type you then change the Issue Type Hierarchy to move the new issue type to a different level. If it already had subtasks when that move happened, then it would keep its subtasks.

If the issue started as a different type, at level 0, had subtasks added, and then had its issue type changed to the issue type at level 2, that is another case where it would keep its subtasks.


author: Dino Murray
body: Hi and thank you for such a quick response.

The information is helpful, although it didn't quite explain what I was seeing in the issue History and our Audit Log.

As I can only see one entry in our Audit Log for Issue Type Hierarchy Changed (but that was for another issue type), so I can only assume Project has been at level 2 for at least 6 months. Otherwise I should expect to see an Audit Log entry for it being moved to level 2, as it is now, if that change was done within the past 6 months.

Then looking at some of the most recently created sub-tasks we have with a Project issue for the parent, I can see from their history that they were created within the past 6 months and the Project issue was set as the parent by a user at the time of creation.

![CEDP-677.png](https://community.atlassian.com/t5/image/serverpage/image-id/343007iAF444B373A84203B/image-size/large?v=v2&px=999 "CEDP-677.png")

So I did some more investigation and believe I now understand the cause a bit better. It appears you can achieve the above issue History (create sub-tasks and set parent to a level 2 issue type without any move or changing of issue type), but only in a specific scenario

Note: The key is the last point, which is why I didn't see any history of them being moved or issue type changed on the sub-task issues, as that is not required!

1. Create a level 2 issue type 'Project'
2. Add one level 1 child issue type 'Epic'.
3. Edit the child issue and change its issue type to 'Sub-task', setting the Parent as the 'Project' issue. (This shows in the history of issue).
4. Return to the parent Project issue and then you can add subsequent sub-tasks (without the need to move or change the issue type, so no history, just shows as issue being created and changed the Parent to the 'Project' issue).

![Test Project.png](https://community.atlassian.com/t5/image/serverpage/image-id/343006i5A0DC24C8A194519/image-size/large?v=v2&px=999 "Test Project.png")

So what I suspect, is that these Project issues had sub-tasks created against them when Project was a standard issue type (level = 0), then Project was changed to Level 2 in the Issue Type Hierarchy. However, as they already had sub-tasks, the + button to specifically add more Sub-Tasks is displayed on the Project issue, as well as the + option menu which include add Child issues. Hence, you can end up with a Level 2 issue type, with Level 1 child and Level -1 Sub-tasks, which show no history of being moved or having issue type changed, despite being created after the Issue Type Hierarchy was applied.   

I appreciate you taking the time to response and for the information you provided, helped me figure out what is happening. We will need to clean up existing sub-tasks under Project issues, so we can prevent any more sub-tasks from being created in this way.

Thanks

comments: author: Trudy Claspill
body: Ah, yes, that was another path I had not thought of. Excellent deductions!


Tags: child

cloud

hierarchy

issue-type

jira-cloud

jira-cloud-administration

parent

sub-task