Troubleshooting Project import failure 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

Importing a project from one Jira setup to another can be a complex task, and users may face several challenges along the way. For guidance on the project import process, please refer to Project Import.

If you're experiencing issues during or after a project import, this guide can help you troubleshoot and resolve them.

Here are few of the frequently observed scenarios listed: 

Environment

Jira Server / Data Center on any version from 8.0.0.

List of scenarios

Diagnosis

One must consider timezone difference between source and target Jira setup before performing project-import. Target Jira setup if not in same timezone as source may have inconsistency in ticket creation-date, update dates(history ) and sprint reports.

Resolution

To avoid this, user would have to set following jvm argument in target setup just before import. This is discussed in JRASERVER-66388. For more details check Set the timezone for the Java environment.

Diagnosis

  • User may observe error like following in UI itself while importing project.

Resolution

Follow below mentioned steps to resolve the problem mentioned in screenshot:

  • Shutdown your Jira application

  • Run the following query in the database:

    update sequence_value_item set seq_id=(select max(id)+100 from customfieldvalue) where seq_name='CustomFieldValue'; 
  • Restart your Jira application

Diagnosis

  • In logs following errors are observed:

    2023-05-16 02:04:21,553-0500 JiraTaskExecutionThread-34 ERROR user1 124x2383970x1 4l7rop IP1,IP2 /secure/admin/ProjectImportSelectProject.jspa [c.a.j.imports.xml.DefaultBackupXmlParser] Unexpected import failure
    java.lang.NullPointerException
            at com.atlassian.greenhopper.imports.LexorankPreImportHandler.addFieldMapping(LexorankPreImportHandler.java:87)
            at com.atlassian.greenhopper.imports.LexorankPreImportHandler.handleEntity(LexorankPreImportHandler.java:73)
            at com.atlassian.jira.imports.project.ao.handler.ChainedAoSaxHandler.endRow(ChainedAoSaxHandler.java:289)
    
    -------
    2023-05-16 02:04:21,553-0500 JiraTaskExecutionThread-34 ERROR user1 124x2383970x1 4l7rop IP1,IP2 /secure/admin/ProjectImportSelectProject.jspa [c.a.j.imports.project.DefaultProjectImportService] There was an unexpected problem processing the file '/opt/nfs/jira/import/intermediate_jira_backup_16_05_2023.zip' when performing a project import.

Resolution

This particular error was resolved with Resolution 2 from Project Import of Software project fails with Unexpected import failure as per following steps. Here user was not having any Advance RoadMap plans thus it was safe to delete records with negative entries for FIELD_ID.

  • Stop intermediate Jira setup

  • In intermediate setup first delete FIELD_ID less than 0. We are deleting records with negative entries for FIELD_ID as Advance Roadmap plans are not used thus there is no need of these invalid records.

    SELECT * FROM "AO_60DB71_LEXORANK" WHERE "FIELD_ID" < 0;
    # If there are entries delete all of them.
    DELETE FROM "AO_60DB71_LEXORANK" WHERE "FIELD_ID" < 0;
  • Start Jira

  • Run a full Reindex (JIRA Administration > System > Indexing), any of the available options will work

  • Generate a new XML backup

  • Perform the Project Import in the target instance

Diagnosis/Resolution

  • We may get errors like following or similar in UI while importing project.

    • Error Message 1: The custom field "issue color" will not be imported because the custom field type "com.pyxis.greenhopper.jira:jsw-issue-color" is not installed.

      • Solution: Remove custom field entry in the entities.xml file:

        <CustomField id="10045" customfieldtypekey="com.pyxis.greenhopper.jira:jsw-issue-color" customfieldsearcherkey="com.pyxis.greenhopper.jira:jsw-issue-color-searcher" name="Issue color" description=""/>

        Note: User would have to search for "Issue color". CustomField id may be different.

    • Error Message 2: The custom field "[CHART] Time in status" will not be imported because the custom field type "com.atlassian.jira.ext.charting:timeinstatus" is not installed.

      • This is related to Bug JRASERVER-31434

      • Solution: Remove custom field entry in the entities.xml file:

        <CustomField id="10011" customfieldtypekey="com.atlassian.jira.ext.charting:timeinstatus" customfieldsearcherkey="com.atlassian.jira.ext.charting:textsearcher" name="[CHART] Time in Status" issuesWithValue="17369"/>


        Note: User would have to search for "Time in Status". CustomField id may be different.

  • There could be more errors related to custom fields like following.
  • Custom Field "Epic Colour"
    • Epic Color  / Epic Colour is a default Jira Software Field
    • Please check if the Custom Field "Epic Color" (without U) is found in the target instance. If so, user may wish to temporarily rename it to "Epic Colour" for the duration of the import.
    • For more information, please see article Project import fails with field does not exist error in Jira server on how to resolve
  • Custom Field "Start Date"


As per doc Restoring a project from backup | Administering Jira applications Data Center and Server 9.10 | Atlassian Documentation , these users will be imported.
The Project Import will attempt to create missing users if they are associated with the project. However, if the Project Import tool cannot create missing mandatory users in your target Jira instance, then you will not be permitted to import the project. This may occur if you have External User Management enabled in your target Jira instance — you will need to disable External User Management or create the missing users manually in your external user repository before commencing the import.

Check if kb article The provided attachments path does not contain a sub-directory called" error during Project Import | Jira | Atlassian Documentation helps.

Diagnosis

  • After Project import, notice that old sprint data is not coming after project import.
  • In logs, following errors are observed.

    2023-05-25 10:35:42,315-0500 JiraTaskExecutionThread-101 ERROR someUser 634x4484656x1 13xwb9r IP1,IP2 /secure/admin/ProjectImportSummary.jspa [c.a.jira.task.TaskMana
    gerImpl] Task 'Importing project 'ProjectToImport'.' failed.
    java.lang.NullPointerException: Entity com.atlassian.greenhopper.service.sprint.SprintAO does not have field CREATED_DATE
            at java.base/java.util.Objects.requireNonNull(Objects.java:246)
            at net.java.ao.EntityManager.create(EntityManager.java:342)
            at net.java.ao.EntityManager.create(EntityManager.java:402)
            at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:101)
            at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.create(TenantAwareActiveObjects.java:272)
            at jdk.internal.reflect.GeneratedMethodAccessor10454.invoke(Unknown Source)
    
    2023-05-30 12:23:37,755-0500 JiraTaskExecutionThread-7 ERROR someUser 743x1094878x1 b0yg2z IP1,IP2 /secure/admin/ProjectImportSummary.jspa [c.a.j.imports.xml.DefaultBackupXmlParser] Unexpected import failure
    java.lang.NullPointerException: Entity com.atlassian.greenhopper.service.sprint.SprintAO does not have field SPRINT_VERSION
            at java.base/java.util.Objects.requireNonNull(Objects.java:246)
            at net.java.ao.EntityManager.create(EntityManager.java:342)
            at net.java.ao.EntityManager.create(EntityManager.java:402)
            at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:101) 
    
    


Resolution

  • Product bug JRASERVER-73107 describes this problem.
  • Fields CREATED_DATE and SPRINT_VERSION in  are not available in table AO_60DB71_SPRINT of Jira DC thus it is safe to DROP these columns.
  • Remove the column from the step/intermediate instance's database directly and create a new XML backup for import in target Jira DC setup.

    ALTER TABLE AO_60DB71_SPRINT DROP COLUMN CREATED_DATE;
    ALTER TABLE AO_60DB71_SPRINT DROP COLUMN SPRINT_VERSION;

Diagnosis

  • Project import fails without any message or notification in UI.
  • In logs, following errors are observed.

    2023-08-16 14:32:27,497-0500 JiraTaskExecutionThread-107 ERROR user1 872x9158412x1 mfkgd9 IP1,IP2 /secure/a
    dmin/ProjectImportSelectProject.jspa [c.a.j.imports.xml.DefaultBackupXmlParser] Unexpected import failure java.lang.NullPointerException
            at com.atlassian.jira.imports.project.customfield.TextLengthValidatingCustomFieldImporter.canMapImportValue(TextLengthValidatingCustomFieldImporter.java:24)
            at com.atlassian.jira.imports.project.handler.CustomFieldValueValidatorHandler.validateCustomFieldValueWithField(CustomFieldValueValidatorHandler.java:98)
            at com.atlassian.jira.imports.project.handler.CustomFieldValueValidatorHandler.handleEntity(CustomFieldValueValidatorHandler.java:73)

Resolution



Last modified on Aug 30, 2023

Was this helpful?

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