Unable to set up Email Channel: Email is currently used by another Service Management project
Platform Notice: Data Center and Cloud By Request - This article was written for the Atlassian data center platform but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.
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
Problem
Users are not able to configure Email Request in Jira Service Desk. The following error message appears:
The email address you entered is currently used by another service project. Please choose another email address. Check out our troubleshooting docs for help resolving the issue.
Diagnosis
Diagnostic Steps
- Check if there is an existing project that is currently using that email address
If there is none, you can then check further if you are affected by this problem.
Cause
The email address is somehow not deleted from the database properly when the corresponding project is removed.
Resolution
Remove the "residue" of the problematic email address from the database.
Run the following query to find the deleted project that contains problematic email address. If it returns any result, you can use below resolution.
select * from "AO_54307E_VIEWPORT" where "PROJECT_ID" not in (select id from project);
Check all email addresses in the database.
select * from "AO_2C4E5C_MAILCONNECTION";
Backup the database before proceeding with below steps.
Bring down Jira and run below queries.
delete from "AO_2C4E5C_MAILHANDLER" where "MAIL_CHANNEL_ID" in (select "ID" from "AO_2C4E5C_MAILCHANNEL" where "PROJECT_ID" not in (select id from project));
delete from "AO_2C4E5C_MAILCHANNEL" where "PROJECT_ID" not in (select id from project);
delete from "AO_2C4E5C_MAILCONNECTION" where "ID" not in (select "MAIL_CONNECTION_ID" from "AO_2C4E5C_MAILCHANNEL");
delete from "AO_54307E_EMAILCHANNELSETTING" where "SERVICE_DESK_ID" in (select "ID" from "AO_54307E_SERVICEDESK" where "PROJECT_ID" not in (select id from project));
- Bring up Jira.