Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-2420

JCMA migration fails when app user is null within project export

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      JCMA migration will fail due to null data for user within Jira work items.

      2025-09-29 14:13:22.658667700 ERROR ABC project-export We couldn't export Issue ABC-123. Reason: java.lang.NullPointerException: null cannot be cast to non-null type com.atlassian.jira.user.ApplicationUser. [JCMA 000]
      

      Steps to Reproduce

      1. Select project where the assignee value is null
      2. Attempt to migrate the project using JCMA

      Expected Results

      JCMA should handle these cases and catch them during pre-check or handle them gracefully to avoid failing the entire migration.

      Actual Results

      The exception below is thrown in the migration log file:

      2025-09-29 14:13:22.658667700 ERROR ABC project-export We couldn't export Issue ABC-123. Reason: java.lang.NullPointerException: null cannot be cast to non-null type com.atlassian.jira.user.ApplicationUser. [JCMA 000]
      

      Workaround

      Use SQL such as:

      SELECT
          ji.id AS issue_id,
          CONCAT(p.pkey, '-', ji.issuenum),
          ji.assignee,
          ji.reporter,
          CASE
              WHEN ji.assignee IS NOT NULL AND cu1.user_name IS NULL THEN 'Assignee missing'
              ELSE NULL
          END AS assignee_status,
          CASE
              WHEN ji.reporter IS NOT NULL AND cu2.user_name IS NULL THEN 'Reporter missing'
              ELSE NULL
          END AS reporter_status
      FROM
          jiraissue ji
      INNER JOIN project p ON (p.id = ji.project)
      LEFT JOIN
          cwd_user cu1 ON ji.assignee = cu1.user_name
      LEFT JOIN
          cwd_user cu2 ON ji.reporter = cu2.user_name
      WHERE
          p.pkey = 'ABC'
          AND (
          (ji.assignee IS NOT NULL AND cu1.user_name IS NULL)
          OR
          (ji.reporter IS NOT NULL AND cu2.user_name IS NULL)
          )
      ORDER BY
          ji.id;
      

      Query result can help identify issues within database.

      1. Create automation to search a project for missing assignees or reporters and add a user in those empty places
      2. Alternative (update the database to insert valid user data)

              Unassigned Unassigned
              asalinasii@atlassian.com Alfonso S. [Atlassian Support]
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: