When viewing email channels in a Jira Service Management Data Center project's settings, an "Invalid configuration" error occurs
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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
When navigating to the Email channels tab in Project settings for a Jira Service Management project, the error Invalid configuration: To receive requests by email, you must have a request type with visible Summary and Description fields. All other request type fields must be optional is displayed:
Environment
Jira Service Management Data Center with at least one project email channel configured
Diagnosis
Run the following SQL query on the Jira database, replacing <PROJECT_KEY>
with the key of the affected project, to list all form fields for the affected project's email channel's request type and whether they are visible (displayed) and/or required:
SELECT "FIELD_ID","LABEL","DISPLAYED","REQUIRED" FROM "AO_54307E_VIEWPORTFIELD"
WHERE "FORM_ID" IN (
SELECT "REQUEST_TYPE_ID" FROM "AO_54307E_EMAILCHANNELSETTING" WHERE "SERVICE_DESK_ID" = (
SELECT "ID" FROM "AO_54307E_VIEWPORT" WHERE "PROJECT_ID" = (
SELECT id FROM project WHERE pkey = '<PROJECT_KEY>'
)
)
)
ORDER BY "FIELD_ID";
This problem occurs when either:
- One or both of the Summary or Description fields has DISPLAYED set to false.
- Any other field besides Summary and Description has REQUIRED set to true.
Cause
When an issue is created via an email channel, the only fields which are populated are the Summary and Description fields (with the email's subject and body, respectively). This means that the request type which that email channel is configured to use must have its fields configured as follows:
- Both the Summary and Description fields must be visible.
- No fields other than Summary and Description can be required.
Normally these constraints are enforced by Jira's web interface, but if a database inconsistency has occurred for some reason (e.g. incorrect manual changes to the database, or a system crash) then the interface safeguards may be bypassed, leading to this error.
Solution
The preferred solution is to edit the request type's fields in the Jira web interface and ensure they meet the requirements stated above.
If this is not possible for any reason, then the following SQL queries can be used to fix all request types used by project email channels in Jira:
Always back up your data before performing any modifications to the database. If possible, test any ALTER, INSERT, UPDATE, or DELETE SQL commands on a staging server first.
UPDATE "AO_54307E_VIEWPORTFIELD" SET "DISPLAYED" = true
WHERE "FORM_ID" IN (SELECT "REQUEST_TYPE_ID" FROM "AO_54307E_EMAILCHANNELSETTING")
AND "FIELD_ID" IN ('summary', 'description')
AND "DISPLAYED" = false;
UPDATE "AO_54307E_VIEWPORTFIELD" SET "REQUIRED" = false
WHERE "FORM_ID" IN (SELECT "REQUEST_TYPE_ID" FROM "AO_54307E_EMAILCHANNELSETTING")
AND "FIELD_ID" NOT IN ('summary', 'description')
AND "REQUIRED" = true;
After running the above SQL queries, Jira must be restarted so that the changes will take effect.