-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
JCMA - 1.12.46
-
None
-
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
- Select project where the assignee value is null
- 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.
- Create automation to search a project for missing assignees or reporters and add a user in those empty places
- Alternative (update the database to insert valid user data)