Error rendering com.atlassian.jira.jira-view-issue-plugin:linkingmodule appears in the Issue View Screen in Jira

Still need help?

The Atlassian Community is here for you.

Ask the community

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 accessing a JIRA issue, the following error appears in the Issue View Screen, specifically under the Issue Link web panel:

Error rendering 'com.atlassian.jira.jira-view-issue-plugin:linkingmodule'. Please contact your Jira administrators.


Environment

Jira Core 7, 8 and 9.


Diagnosis

Aside from the specific error on the screen mentioning the linkingmodule, a NullPointerException may also be recorded in the <jira-home-folder>/log/atlassian-jira.log  when reloading the Issue page or within some Dashboard gadgets similar to: 

An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: ------- org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getHtml' in class com.atlassian.jira.issue.fields.layout.column.ColumnLayoutItemImpl threw exception java.lang.NullPointerException at templates/jira/issue/table/macros.vm[line 117, column 34] at 


The output of the below query on Jira's DB should also return the Issue that's presenting the error in either "Source Issue Key (Id)" or "Destination Issue Key (Id)":

select il.id as "Issue Link Id", il.linktype as "Issue Link Type", concat(ps.pkey, concat('-', concat(s.issuenum, concat(' (', concat(s.id, ')'))))) as "Source Issue Key (Id)", concat(pd.pkey, concat('-', concat(d.issuenum, concat(' (', concat(d.id, ')'))))) as "Destination Issue Key (Id)"
from issuelink il
left join issuelinktype ilt on ilt.id = il.linktype
left join jiraissue s on s.id = il.source
left join project ps on ps.id = s.project
left join jiraissue d on d.id = il.destination
left join project pd on pd.id = d.project
where ilt.id is null;


Cause

This error's caused by an Issue Link of a Type that doesn't exist.

This situation might've been caused by some 3rd party app, a failed import or a direct DB manipulation.

Solution

The simplest way to fix this is to:

  1. Update the corrupted links on the DB to an existing one
  2. Perform a rolling-restart on Jira Data Center (or restart Jira if it's a Jira Server)
  3. Perform a Full re-index in one of the nodes (or background re-index only  if it's Jira Server)
  4. Change the links as needed

1. Update the links in the database

1.1 Identify the affected Issues

The same query from the Diagnosis section can be used to assess the impact:

select il.id as "Issue Link Id", il.linktype as "Issue Link Type", concat(ps.pkey, concat('-', concat(s.issuenum, concat(' (', concat(s.id, ')'))))) as "Source Issue Key (Id)", concat(pd.pkey, concat('-', concat(d.issuenum, concat(' (', concat(d.id, ')'))))) as "Destination Issue Key (Id)"
from issuelink il
left join issuelinktype ilt on ilt.id = il.linktype
left join jiraissue s on s.id = il.source
left join project ps on ps.id = s.project
left join jiraissue d on d.id = il.destination
left join project pd on pd.id = d.project
where ilt.id is null;

Important: take note of this output as it'll be useful later


1.2 Choose an existing Issue Link Type

From the output below, choose any Link Type.

If possible, it's best to create a new Issue Link Type for this. You may name it as something to suggest to users it's not meant to be used. This will mitigate the risk of duplicated Issue Links to the same Issues.

select * from issuelinktype
where pstyle is null
order by id asc;


With the chosen Issue Link Type Id, replace it on the command below and execute it on Jira's DB:

update issuelink set linktype = <chosen-id> where linktype not in (select id from issuelinktype);

It is recommended to have a database backup performed prior to making any database modification statements in the event a rollback is needed.  


2. Restart Jira

To recycle Jira's caches, you may perform a rolling restart one-node-at-a-time.

Creating, updating or deleting any Issue Link Type would also flush the caches throughout the cluster.


3. Full re-index

On the soonest opportunity, perform a Full re-index in Jira.


4. Change the links as needed

You may now use the output of step 1.1 to go back to each of the affected Issues and delete or change the "new" Links as needed.

If you created a new Issue Link Type for this, you may delete it through the Admin screen and Jira will prompt you to choose:

  • If you want to delete all associated Issue Links of this Type
  • If you want to update the existing Links to a new Type



Last modified on Jan 10, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.