-
Bug
-
Resolution: Won't Fix
-
High
-
None
-
None
-
76
-
Severity 2 - Major
-
13
Summary
When importing CSV to JIRA with parents and sub-tasks, (at least) 3 problems may happen depending on how the parent/sub-tasks are set, all due to no validation in the CSV file:
- If we import a sub-task (using the 'sub-task' Issue Type') without a parent, a sub-task will be created without a parent. (Example problem1.csv
) - This problem was already reported as an old bug from 2015, initially reported to Server: JRACLOUD-42405
- If we import 2 parents and set both of them as parents of a single sub-task, the sub-task will have 2 parents (Example problem2.csv
)
- If we import a sub-task having another sub-task as parent, it will have that sub-task as parent (Example problem3.csv
)
Identifying problems
We can check each problem and confirm them using the following queries:
Problem 1: Sub-tasks without parents:
select i.id as "child_id", ( p.pkey || '-' || i.issuenum ) as "child_key", it.pname as "child_type", it.pstyle as "child_type_style" from jiraissue i join project p on i.project = p.id join issuetype it on i.issuetype = it.id left join (select destination, source from issuelink where linktype in (select id from issuelinktype where linkname = 'jira_subtask_link') ) t on i.id = t.destination where it.pstyle = 'jira_subtask' and ( t.source not in (select id from jiraissue) or t.source is null) order by child_id desc;
child_id | child_key | child_type | child_type_style |
---|---|---|---|
10013 | PCIT-12 | Sub-task | jira_subtask |
Problem 2: Issue with duplicate parents
select i.id as "child_id", ( p.pkey || '-' || i.issuenum ) as "child_key", it.pname as "child_type", it.pstyle as "child_type_style", t.count as "number_of_parents", parent_i.id as "parent_id", ( parent_p.pkey || '-' || parent_i.issuenum ) as "parent_key", parent_it.pname as "parent_type", parent_it.pstyle as "parent_type_style" from jiraissue i join project p on i.project = p.id join issuetype it on i.issuetype = it.id join (select destination, count(*) from issuelink where linktype= (select id from issuelinktype where linkname = 'jira_subtask_link') group by destination having count(*) > 1) t on i.id = t.destination join issuelink parent_l on i.id = parent_l.destination join jiraissue parent_i on parent_l.source = parent_i.id join project parent_p on parent_p.id = parent_i.project join issuetype parent_it on parent_i.issuetype = parent_it.id where parent_l.linktype in (select id from issuelinktype where linkname = 'jira_subtask_link') order by child_id desc;
child_id | child_key | child_type | child_type_style | number_of_parents | parent_id | parent_key | parent_type | parent_type_style |
---|---|---|---|---|---|---|---|---|
10012 | PCIT-11 | Sub-task | jira_subtask | 2 | 10010 | PCIT-9 | Task | |
10012 | PCIT-11 | Sub-task | jira_subtask | 2 | 10011 | PCIT-10 | Task |
Problem 3: Issues with sub-tasks as parents
select i.id as "child_id", ( p.pkey || '-' || i.issuenum ) as "child_key", it.pname as "child_type", it.pstyle as "child_type_style", parent_i.id as "parent_id", ( parent_p.pkey || '-' || parent_i.issuenum ) as "parent_key", parent_it.pname as "parent_type", parent_it.pstyle as "parent_type_style" from jiraissue i join project p on i.project = p.id join issuetype it on i.issuetype = it.id join issuelink il on i.id = il.destination join jiraissue parent_i on il.source = parent_i.id join project parent_p on parent_p.id = parent_i.project join issuetype parent_it on parent_i.issuetype = parent_it.id where il.linktype in (select id from issuelinktype where linkname = 'jira_subtask_link') and it.pstyle = 'jira_subtask' and parent_it.pstyle = 'jira_subtask'
child_id | child_key | child_type | child_type_style | parent_id | parent_key | parent_type | parent_type_style |
---|---|---|---|---|---|---|---|
10015 | PCIT-14 | Sub-task | jira_subtask | 10014 | PCIT-13 | Sub-task | jira_subtask |
Steps to Reproduce
- Import problem1.csv
or problem2.csv
or problem3.csv
Expected Results
Issue are not created, because they would create an invalid state in JIRA.
Actual Results
The issues are imported and invalid states mentioned above are created. Boards containing issues from problem 1 (and possible the others as well) break, generally showing a blank page.
Workaround
If possible:
- Delete the broken issues
- Fix the CSV to have sub-tasks with only a single parent, no sub-tasks as parent
- Import it again
OR
- Move the child issue to the incorrect parent issue and move it back to the correct parent issue.
Or Contact Atlassian Support
- causes
-
MIG-375 Permanently deleting project fails when it was imported via CSV
-
- Closed
-
- duplicates
-
JRACLOUD-81949 CSV import allow orphan sub-task via External System Import
-
- Closed
-
- is related to
-
JRACLOUD-79997 Generic error message for permanent project deletion conceals fact that Support assistance may be needed
-
- Closed
-
-
JRACLOUD-68503 Jira allows update to invalid issue type through CSV Import
-
- Closed
-
- relates to
-
JRASERVER-66947 Importing same sub-task from CSV with diferrent parent id would cause the sub-task to linked with multiple parents
-
- Gathering Impact
-
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
Form Name |
---|
Hello!
We’re looking to improve the import experience in Jira and are keen to understand how our community is using the Jira Import Module (JIM). If you’ve used JIM to migrate/move data into Jira recently, we’d love to hear about your experience. Please take a few minutes to fill out this survey. Your feedback will help us learn how we can improve your experience in importing data.
Survey link - https://forms.gle/NYNkmS92r96z42QV9
Thanks!
Prashanth M
Product Manager, Jira Platform