"A comment must have an issue id specified" error during project import

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

Symptoms

During project import, the error will thrown in the JIRA logs and stop the project import.

The following appears in the atlassian-jira.log:

1 2 2012-07-18 12:59:04,562 JiraTaskExectionThread-2 WARN vadmin45 778x2212x1 103sh2j 10.1.4.64 /secure/admin/ProjectImportSelectProject.jspa [imports.project.handler.ChainedSaxHandler] Encountered a parsing exception. com.atlassian.jira.exception.ParseException: A comment must have an issue id specified.

Cause

There are comments that are not referring to any issue.

Resolution

  1. Run the following to verify that there is comment that not referring to issue in database:

    1 select * from jiraaction where issueid is null and actiontype = 'comment';
  2. If the above query returns any result, perform the following:

    1. Backup the source database

    2. Shutdown the source JIRA

    3. Run the following to remove the entries:

      1 delete from jiraaction where issueid is null and actiontype = 'comment';
    4. Restart JIRA

    5. Reindex your JIRA

    6. Export XML from the source JIRA

    7. Try to perform the project import again to target JIRA instance

Always backup your database before any import or database modification.

Reindexing will cause the system to be unaccessible.

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.