Issue screen displays error rendering greenhopper-epics-issue-web-panel in Jira server

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

Symptoms

While accessing only specific issues the following message appears on the screen:

Error rendering 'com.pyxis.greenhopper.jira:greenhopper-epics-issue-web-panel'. Please contact your JIRA administrators.

The following appears in the atlassian-jira.log:

2013-10-29 18:11:36,513 TP-Processor2 ERROR admin 1091x126502x1 1uiw3e3 127.0.0.1 /browse/TST-4 [jira.web.component.ModuleWebComponentImpl] An exception occured while rendering the web panel:
 com.pyxis.greenhopper.jira:greenhopper-epics-issue-web-panel (null)java.lang.IllegalArgumentException: The validated object is null

Environment

Jira Data Center on any version.

Diagnosis

The following SQL query will search for any invalid epic links in your instance of JIRA:

SELECT * FROM issuelink  il
WHERE il.LINKTYPE =
  ( SELECT id FROM issuelinktype WHERE linkname = 'Epic-Story Link') 
AND
(
  il.destination IS NULL
  OR il.SOURCE IS NULL
  OR not exists (SELECT null FROM jiraissue ji where ji.id = il.destination) 
  OR not exists (SELECT null FROM jiraissue ji where ji.id = il.source) 
);

If the query above returns any results, proceed to the Resolution to remove the invalid epic links.

Cause

One or more entries for Epic links within the database are invalid/corrupted.

This situation is usually seen when having Transition Post Functions that update values. Plugins like "JIRA Suite Utilities" provide additional functionality that it may fail depending on conditions when they are executed. For example, adding an Epic Link to an Epic. This will exit the Creation process and leave an inconsistency on issues. Make sure the "Creates the issue originally." Post Function is first in the Create transition.

Resolution

If you have Script Runner installed you can use the following script in the script runner console:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.link.IssueLinkManager
import com.atlassian.jira.issue.link.IssueLink
import com.atlassian.jira.user.ApplicationUser

IssueManager issueManager = ComponentAccessor.getIssueManager()

Issue issue = issueManager.getIssueObject("XXX-XXXX") //Where XXX-XXXX is the issue key.

IssueLinkManager issueLinkManager = ComponentAccessor.getIssueLinkManager()
List<IssueLink> outLinks = issueLinkManager.getOutwardLinks(issue.id)
ApplicationUser user = ComponentAccessor.jiraAuthenticationContext.loggedInUser

outLinks.each { link ->
if(link.getIssueLinkType().name == "Epic-Story Link")
{
if (link.getDestinationObject() == null)

{ issueLinkManager.removeIssueLink(link, user) }
}
}

While the script will return an error when run it'll remove the null object which should fix the epic panel on the affected issue

Follow the instructions from Using the database integrity checker:

Through the database:

  1. Shutdown JIRA;
  2. Create a database backup;
  3. Execute the following query to remove the corrupt entry:

    delete from issuelink  il
    WHERE il.LINKTYPE in
      ( SELECT id FROM issuelinktype WHERE linkname = 'Epic-Story Link') 
    AND
    (
      il.destination IS NULL
      OR il.SOURCE IS NULL
      OR not exists (SELECT null FROM jiraissue ji where ji.id = il.destination) 
      OR not exists (SELECT null FROM jiraissue ji where ji.id = il.source) 
    );
    tip/resting Created with Sketch.

    If the SELECT query from Diagnosis taking too long, the DELETE query can be replaced with the correct ID returned from the SELECT query as alternative.

  4. Restart JIRA.

Last modified on Jan 24, 2025

Was this helpful?

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