We couldn't import Issue because of missing dependencies: Project - JCMA Error
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When trying to run the Jira Cloud Migration Assistant (JCMA) to migrate data from Server to the Atlassian Cloud, the migration plan fails with the following message, related to a Project dependency:
ERROR <Project_Key> project-import
We couldn’t import Issue <Issue_Key> because of 1 missing dependencies: Project <Project_Dependency_Key>.
This caused <Number_of_Items> other items to fail.
Check the reasons for the missing dependencies on your server site.
Environment
This message applies to the Jira Cloud Migration Assistant (JCMA).
- From Server to Cloud
Cause
This happens because some Jira Issues may be using a project value (id or key) from another project. These values may be referenced in a custom field of type Project Picker.
If the dependent project is not included in the migration plan, then JCMA can't bring its references.
Identify
Run this query on the Jira server database to identify which Jira Issues from the project key referenced on the logs are impacted by this problem.
WITH info AS
(SELECT p.id AS project_id_source
, CONCAT(p.pkey, '-', j.issuenum) AS issuekey_source
, cf.cfname AS custom_field_name
, cfv.numbervalue::INTEGER AS project_id_dependency
FROM jiraissue j
INNER JOIN project p ON (p.id = j.project)
INNER JOIN customfieldvalue cfv ON (cfv.issue = j.id)
INNER JOIN customfield cf ON (cf.id = cfv.customfield)
INNER JOIN projectversion pv ON (pv.id = cfv.numbervalue::INTEGER)
WHERE cf.customfieldtypekey = 'com.atlassian.jira.plugin.system.customfieldtypes:project'
AND p.pkey = 'PROJECT_KEY'
AND p.id != cfv.numbervalue::INTEGER)
, projects AS
(SELECT id AS pid_dep
, pkey AS project_key_dependency
FROM project)
SELECT project_id_source
, issuekey_source
, custom_field_name
, pid_dep
, project_key_dependency
FROM info i
INNER JOIN projects ps ON (i.project_id_dependency = ps.pid_dep);
WITH info AS
(SELECT p.id AS project_id_source
, CONCAT(CONCAT(p.pkey, '-'), j.issuenum) AS issuekey_source
, cf.cfname AS custom_field_name
, CAST(cfv.numbervalue AS NUMBER) AS project_id_dependency
FROM jiraissue j
JOIN project p ON (p.id = j.project)
JOIN customfieldvalue cfv ON (cfv.issue = j.id)
JOIN customfield cf ON (cf.id = cfv.customfield)
JOIN projectversion pv ON (pv.id = CAST(cfv.numbervalue AS NUMBER))
WHERE cf.customfieldtypekey = 'com.atlassian.jira.plugin.system.customfieldtypes:project'
AND p.pkey = 'PROJECT_KEY'
AND p.id != CAST(cfv.numbervalue AS NUMBER))
, projects AS
(SELECT id AS pid_dep
, pkey AS project_key_dependency
FROM project)
SELECT project_id_source
, issuekey_source
, custom_field_name
, pid_dep
, project_key_dependency
FROM info i
INNER JOIN projects ps ON (i.project_id_dependency = ps.pid_dep);
WITH info AS
(SELECT p.id AS project_id_source
, CONCAT(p.pkey, '-', j.issuenum) AS issuekey_source
, cf.cfname AS custom_field_name
, CAST(cfv.numbervalue AS BIGINT) AS project_id_dependency
FROM jiraissue j
INNER JOIN project p ON (p.id = j.project)
INNER JOIN customfieldvalue cfv ON (cfv.issue = j.id)
INNER JOIN customfield cf ON (cf.id = cfv.customfield)
INNER JOIN projectversion pv ON (pv.id = CAST(cfv.numbervalue AS BIGINT))
WHERE cf.customfieldtypekey = 'com.atlassian.jira.plugin.system.customfieldtypes:project'
AND p.pkey = 'PROJECT_KEY'
AND p.id != CAST(cfv.numbervalue AS BIGINT))
, projects AS
(SELECT id AS pid_dep
, pkey AS project_key_dependency
FROM project)
SELECT project_id_source
, issuekey_source
, custom_field_name
, pid_dep
, project_key_dependency
FROM info i
INNER JOIN projects ps ON (i.project_id_dependency = ps.pid_dep);
SELECT project_id_source,
issuekey_source,
custom_field_name,
pid_dep,
project_key_dependency
FROM ( SELECT p.id AS project_id_source
, CONCAT(p.pkey, j.issuenum) AS issuekey_source
, cf.cfname AS custom_field_name
, CAST(cfv.numbervalue AS UNSIGNED) AS project_id_dependency
FROM jiraissue j
INNER JOIN project p ON (p.id = j.project)
INNER JOIN customfieldvalue cfv ON (cfv.issue = j.id)
INNER JOIN customfield cf ON (cf.id = cfv.customfield)
INNER JOIN projectversion pv ON (pv.id = CAST(cfv.numbervalue AS UNSIGNED))
WHERE cf.customfieldtypekey = 'com.atlassian.jira.plugin.system.customfieldtypes:project'
AND p.pkey = 'PROJECT_KEY'
AND p.id != CAST(cfv.numbervalue AS UNSIGNED) ) i
JOIN ( SELECT id AS pid_dep, pkey AS project_key_dependency FROM project ) ps ON (i.project_id_dependency = ps.pid_dep);
Note
Replace the PROJECT_KEY placeholder with the project key of the impacted project.
Solution
- If that data is not necessary to be moved over, remove the custom field of type Project Picker from all the screens associated with the project you're trying to migrate.
- That'll cause JCMA to skip exporting those references.
- If data is necessary to be moved over, we recommend creating a new custom field of a different type and copying the same values from the Project Picker to this new one.
- After that, you should also make sure to remove the Project Picker custom field from the screen of the impacted project.