Issues in Advanced Roadmaps Plan not showing Components

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

You may be presented with issues not showing some or all of their components on the Advanced Roadmaps for Jira (formerly Portfolio) Plan. This article shows one of the possible causes and the fix for it.

Environment

Reproduced on 8.13.7 with ARJ 3.29.7

Diagnosis

A Component can only be attributed to one project and that association is made by the project  field on the component table.

You may have a component with the same name on multiple projects but for Jira they will have distinct IDs and will be different for all intents and purposes.

It was found that one cause for Components not being displayed in a Plan is that the issue is associated to the Component of another project even though the name is the same.

Method #1

To confirm this is the cause do the following:

  • On issue view, hover the cursor over AB1 (the component you're expecting to see in the plan). See that in the bottom it shows JQL pointing to NEWPB (project B's key):

    (Auto-migrated image: description temporarily unavailable)
  • On the plan we would not see Component AB1 (it's an example, present on both project PA and NEWPB with the same name, different ID):

    (Auto-migrated image: description temporarily unavailable)

Method #2:

Query to find issues with incorrect component associations:

1 2 3 4 5 6 7 8 9 10 select na.source_node_id as "Issue id", ji.project as "Issue Project", CONCAT(p1.pkey,'-',ji.issuenum) as "Issue Key", c.id as "Component ID",c.cname,c.project as "Component Project",p2.pkey as "Component Project Key" from nodeassociation na join component c on na.sink_node_id = c.id join jiraissue ji on na.source_node_id = ji.id join project p1 on p1.id = ji.project join project p2 on p2.id = c.project where na.source_node_entity = 'Issue' and na.sink_node_entity='Component' and ji.project <> c.project;

Additional info

These queries below may assist in understanding how the data is put together.

1 2 3 4 5 6 7 8 9 10 11 -- Getting all components for yourprojectkey select p.id,p.pname,p.pkey,p.originalkey,c.id,c.cname,c.archived from project p left join component c on c.project = p.id where p.pkey in ('yourprojectkey'); -- Getting all issues for yourprojectkey select * from jiraissue where project in (select id from project where "pkey" in ('yourprojectkey')); -- Getting all issue-component associations for issues of yourprojectkey select * from nodeassociation where source_node_entity = 'Issue' and sink_node_entity='Component' and source_node_id in (select id from jiraissue where project in (select id from project where "pkey" in ('yourprojectkey')));

Cause

The Root Cause of the association on an issue to another project's components is unknown. It's possible to reproduce the issue by manually updating nodeassociation table to associate an issue to another project's component.

It could potentially be caused by misconfigured automation or custom code but it remains unknown.

For reference, below are the steps taken to reproduce the issue:

  • Creating two components named AB1 - one on project A and another on project B.

  • Create an issue PA-3 on project A associated to project A's AB1.

  • Manually updating nodeassociation table to point PA-3 to project B's AB1 .

  • Ran a project re-index on PA.

  • On the plan we would not see AB1:

  • (Auto-migrated image: description temporarily unavailable)
  • Issue actually has it and hovering over AB1 shows JQL pointing to NEWPB (project B's key):

  • (Auto-migrated image: description temporarily unavailable)

Solution

Method #1

The easiest solution is to remove the Component that is associated to the wrong project and re-add it. It should automatically point to the correct project as long as there is a Component with the same name. On the example above, I'd simply remove AB1 and re-add it through the UI. It means you'd have to change each issue individually.

On the tests it took a project re-index for the Component to become visible on the Plan.

Method #2

This method involves database manipulation.

⚠️ As with all recommendations made by Atlassian Support, please follow best practices for Change Management and test and validate these settings in a Test/Development and Staging environment prior to rolling any changes into a Production environment.

It's best to have a DB backup as well.

First of all you should have the results of the query from Method #2 of the Diagnosis section saved. It contains the same original information we'll be performing updates here.

Tested in postgreSql 9.6.21. You may need to modify it for other databases.

This query below will produce the update statements to point the issue component association to the correct project. It is a query that will return one row for each incorrect component for each issue.

1 2 3 4 5 6 7 8 9 select 'update nodeassociation set sink_node_id='||c2.id||' where source_node_id='||na.source_node_id||' and sink_node_id='||c1.id||';' from nodeassociation na join component c1 on na.sink_node_id = c1.id join jiraissue ji on na.source_node_id = ji.id left join component c2 on c2.cname = c1.cname where na.source_node_entity = 'Issue' and na.sink_node_entity='Component' and ji.project <> c1.project and c2.project = ji.project;

Run the generated statements and then do a project re-index for all impacted projects or a full re-index.

Updated on April 24, 2025

Still need help?

The Atlassian Community is here for you.