JCMA migration error: "project-import We couldn't import Request Type because of 1 missing dependencies: Project Component"
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Jira Cloud Migration Assistant app supports the migration of JSM (Service Management/former Service Desk) Projects. JSM-specific related errors might surface during a JCMA plan execution.
This error is one of the potential ones an admin may face while migrating data from a Jira DC instance along with JSM Projects over to an Atlassian Jira Cloud site.
Environment
JCMA 1.6.6 and higher
JData Center 7.6.0 and higher
Jira Service Management DC 3.9.0 and higher
Error
This error message below will surface when there is an orphaned or deleted default component associated with a Request Type under the JSM Project Request Type area, Edit fields section.
One situation where this error can happen is when a default component is chosen as a default one, which makes it to be a hidden field on the request form. A project admin may have deleted the component and that change isn't propagated into the Edit fields section, keeping the previous reference there.
1
<date> <time> ERROR <pkey> project-import We couldn't import Request Type <request-type-id> because of 1 missing dependencies: Project Component <component-id>. This caused <number> other items to fail. Check the reasons for the missing dependencies on your server site.
Solution
Detection
Get the orphaned component values
First, we must identify which orphaned components are being referenced in the error message.
This SQL query will help with that. It'll bring all components associated with the request types of the provided project.
Replace the <project key> with the project key of the impacted proejct
PostgreSQL
PostgreSQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SELECT vpf."ID" AS "Request Type ID"
, vpf."NAME" AS "Request Type Name"
, vp."NAME" AS "Project Name"
, vpfd."LABEL" AS "Field Name"
, vpfv."VALUE" AS "Component ID"
, COALESCE(c.cname, 'Component not found') AS "Component Name"
FROM "AO_54307E_VIEWPORT" vp
JOIN "AO_54307E_VIEWPORTFORM" vpf ON (vpf."VIEWPORT_ID" = vp."ID")
JOIN "AO_54307E_VIEWPORTFIELD" vpfd ON (vpfd."FORM_ID" = vpf."ID")
JOIN "AO_54307E_VIEWPORTFIELDVALUE" vpfv ON (vpfv."FIELD_ID" = vpfd."ID")
LEFT JOIN component c ON (c.id = vpfv."VALUE"::int)
WHERE UPPER(vp."KEY") = '<project key>'
AND vpfv."FIELD_NAME" = 'components'
ORDER BY vpf."ID";
MySQL
MySQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SELECT vpf.ID AS "Request Type ID"
, vpf.NAME AS "Request Type Name"
, vp.NAME AS "Project Key"
, vpfd.LABEL AS "Field Name"
, vpfv.VALUE AS "Component ID"
, COALESCE(c.cname, 'Component not found') AS "Component Name"
FROM AO_54307E_VIEWPORT vp
JOIN AO_54307E_VIEWPORTFORM vpf ON (vpf.VIEWPORT_ID = vp.ID)
JOIN AO_54307E_VIEWPORTFIELD vpfd ON (vpfd.FORM_ID = vpf.ID)
JOIN AO_54307E_VIEWPORTFIELDVALUE vpfv ON (vpfv.FIELD_ID = vpfd.ID)
LEFT JOIN component c ON (c.id = CAST(vpfv.VALUE AS UNSIGNED))
WHERE UPPER(vp.KEY) = 'ITHELP'
AND vpfv.FIELD_NAME = 'components'
ORDER BY vpf.ID;
Oracle
Oracle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SELECT vpf.ID AS "Request Type ID"
, vpf.NAME AS "Request Type Name"
, vp.NAME AS "Project Name"
, vpfd.LABEL AS "Field Name"
, vpfv.VALUE AS "Component ID"
, COALESCE(c.cname, 'Component not found') AS "Component Name"
FROM AO_54307E_VIEWPORT vp
JOIN AO_54307E_VIEWPORTFORM vpf ON (vpf.VIEWPORT_ID = vp.ID)
JOIN AO_54307E_VIEWPORTFIELD vpfd ON (vpfd.FORM_ID = vpf.ID)
JOIN AO_54307E_VIEWPORTFIELDVALUE vpfv ON (vpfv.FIELD_ID = vpfd.ID)
LEFT JOIN component c ON (c.id = CAST(TO_CHAR(vpfv.VALUE) AS NUMBER))
WHERE UPPER(vp."KEY") = '<project key>'
AND vpfv.FIELD_NAME = 'components'
ORDER BY vpf.ID;
MSSQL Server
MSSQL Server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SELECT vpf.ID AS "Request Type ID"
, vpf.NAME AS "Request Type Name"
, vp.NAME AS "Project Name"
, vpfd.LABEL AS "Field Name"
, vpfv.VALUE AS "Component ID"
, COALESCE(c.cname, 'Component not found') AS "Component Name"
FROM AO_54307E_VIEWPORT vp
JOIN AO_54307E_VIEWPORTFORM vpf ON (vpf.VIEWPORT_ID = vp.ID)
JOIN AO_54307E_VIEWPORTFIELD vpfd ON (vpfd.FORM_ID = vpf.ID)
JOIN AO_54307E_VIEWPORTFIELDVALUE vpfv ON (vpfv.FIELD_ID = vpfd.ID)
LEFT JOIN component c ON (c.id = CAST(vpfv.VALUE AS NUMERIC))
WHERE UPPER(vp."KEY") = '<project key>'
AND vpfv.FIELD_NAME = 'components'
ORDER BY vpf.ID;
Example of an affected environment:

The component with id 10000 doesn't exist anymore.
One can also check if the default value for that component is valid by clicking on the Edit value option, which will present the following screen:

Resolution
The fix is to either:
remove the invalid default value for the component or
to set a valid one
New JCMA plan
Once you've fixed the orphaned components, you should be good to create a new migration plan in JCMA.
Was this helpful?