"Need a parameter for notification type SINGLE_USER" during project migration
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
Check what to do when your project migration with the Jira Cloud Migration Assistant (JCMA) fails with the error "Need a parameter for notification type SINGLE_USER".
Overview
This error can happen when a Notification of type Single User does not have a valid association with an actual user.
This will cause JCMA to fail while importing this project into the Jira Cloud site with this error message:
ERROR <project key> project-import We couldn't import Notification Scheme <ID>. Reason: IllegalArgumentException: Need a parameter for notification type SINGLE_USER.
Detection
First, we must identify which notifications are referenced in the error message.
The below SQL query will help with that. It'll bring all notifications of type Single User with invalid user parameters.
It'll list the Notification Scheme where the invalid notification type was identified.
SELECT n.id AS notification_id
, n.notif_type AS notification_type
, n.scheme AS notification_scheme_id
, ns.name AS notification_scheme_name
, c.lower_email_address
, c.display_name
, c.active AS active_user
FROM notification n
LEFT JOIN notificationscheme ns ON (ns.id = n.scheme)
LEFT JOIN app_user a ON (a.user_key = n.notif_parameter)
LEFT JOIN cwd_user c ON (a.lower_user_name = c.lower_user_name)
WHERE n.notif_type = 'Single_User'
AND n.notif_parameter IS NULL;
Example of an affected environment:
The affected Notification Scheme here is the Default Notification Scheme.
For reference, this is what a valid notification of type Single User looks like (notice the username associated with the notification):
Solution
On Jira On-Premise, go to Jira Administration (Cog Icon on the right upper-band) → Issues → Notification schemes (on the left-hand-side menu)
Find the affected Notification Scheme and open it. It'll list the notifications defined in that scheme.
Find the ones where the notification is Single User, and no username is associated.
You can delete the affected notification.
Once you've fixed the affected Notification Schemes, you should be able to create a new migration plan in JCMA.