We couldn't import Portlet Configuration error in project migration
Summary
Learn what to do when your project migration with the Jira Cloud Migration Assistant (JCMA) fails with this error "We couldn't import Portlet Configuration".
Overview
When migrating projects using the JCMA, the following error messages can be seen in the migration or application logs:
ERROR <project_key> project-import We couldn't import Portlet Configuration stats-gadget because of 1 missing dependencies: Filter <filter_id>.
ERROR <project_key> project-import We couldn't import Portlet Configuration greenhopper-sprint-burndown because of 1 missing dependencies: Board <board_id>.
ERROR <project_key> project-import We couldn't import Portlet Configuration filter-results-gadget because of 2 missing dependencies: Custom Field '<Name>', Custom Field '<name>'.
The error message indicates that the gadgets migration failed due to missing dependencies. Gadgets are entities that can embed other entities, like boards, filters, and custom fields.
It's necessary that the embedded entities are successfully migrated for the gadget to also be migrated.
Despite the error, the Dashboard will most likely be migrated, but broken.
Solution
- Identify the affected Dashboard with the queries in the next section.
- Fix the dependencies in the Dashboards by either:
- Substituting the entity listed as missing dependency by valid entities.
- Removing the entity listed as a missing dependency.
Alternatively, you can manually update the Dashboard in the cloud instance after the migration.
Identify the affected board
Make sure to replace the "<ID>" in the last line of the queries with the appropriate entity ID.
Missing dependency filter
SELECT pp.id
, pp.pagename
FROM portalpage pp
JOIN portletconfiguration pc ON pc.portalpage = pp.id
JOIN gadgetuserpreference gp ON gp.portletconfiguration = pc.id
WHERE gp.userprefkey = 'filterId'
AND CAST(gp.userprefvalue AS INTEGER) IN (<ID>, <ID>, <ID>);
SELECT pp.id
, pp.pagename
FROM portalpage pp
JOIN portletconfiguration pc ON pc.portalpage = pp.id
JOIN gadgetuserpreference gp ON gp.portletconfiguration = pc.id
WHERE gp.userprefkey = 'filterId'
AND CAST(gp.userprefvalue AS DECIMAL) IN (<ID>, <ID>, <ID>);
SELECT pp.id
, pp.pagename
FROM portalpage pp
JOIN portletconfiguration pc ON pc.portalpage = pp.id
JOIN gadgetuserpreference gp ON gp.portletconfiguration = pc.id
WHERE gp.userprefkey = 'filterId'
AND TO_NUMBER(TO_CHAR(gp.userprefvalue)) IN (<ID>, <ID>, <ID>);
SELECT pp.id
, pp.pagename
FROM portalpage pp
JOIN portletconfiguration pc ON pc.portalpage = pp.id
JOIN gadgetuserpreference gp ON gp.portletconfiguration = pc.id
WHERE gp.userprefkey = 'filterId'
AND CONVERT(VARCHAR, gp.userprefvalue) IN (<ID>, <ID>, <ID>);
Missing dependency board
SELECT pp.id
, pp.pagename
FROM portalpage pp
JOIN portletconfiguration pc ON pc.portalpage = pp.id
JOIN gadgetuserpreference gp ON gp.portletconfiguration = pc.id
WHERE gp.userprefkey = 'rapidViewId'
AND CAST(gp.userprefvalue AS INTEGER) IN (<ID>, <ID>, <ID>)
SELECT pp.id
, pp.pagename
FROM portalpage pp
JOIN portletconfiguration pc ON pc.portalpage = pp.id
JOIN gadgetuserpreference gp ON gp.portletconfiguration = pc.id
WHERE gp.userprefkey = 'rapidViewId'
AND CAST(gp.userprefvalue AS DECIMAL) IN (<ID1>, <ID>, <ID>)
SELECT pp.id
, pp.pagename
FROM portalpage pp
JOIN portletconfiguration pc ON pc.portalpage = pp.id
JOIN gadgetuserpreference gp ON gp.portletconfiguration = pc.id
WHERE gp.userprefkey = 'rapidViewId'
AND TO_NUMBER(TO_CHAR(gp.userprefvalue)) IN (<ID>, <ID>, <ID>)
SELECT pp.id
, pp.pagename
FROM portalpage pp
JOIN portletconfiguration pc ON pc.portalpage = pp.id
JOIN gadgetuserpreference gp ON gp.portletconfiguration = pc.id
WHERE gp.userprefkey = 'rapidViewId'
AND CONVERT(VARCHAR, gp.userprefvalue) IN (<ID>, <ID>, <ID>)
Missing dependency custom field
SELECT pp.id
, pp.pagename
FROM portalpage pp
JOIN portletconfiguration pc ON pc.portalpage = pp.id
JOIN gadgetuserpreference gp ON gp.portletconfiguration = pc.id
WHERE gp.userprefkey = 'columnNames'
AND gp.userprefvalue LIKE '%customfield_<ID>%'
OR gp.userprefvalue LIKE '%customfield_<ID>%'