"CommentBodyCharacterLimitExceededException: No message" or "The entered text is too long. It exceeds the allowed limit of 32,767 characters.." error message in JCMA
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
When trying to run the Jira Cloud Migration Assistant (JCMA) to migrate from Server to Cloud, the migration plan may fail due to a project presenting one of the following error messages:
ERROR <project-key> project-import We couldn't import Comment <comment-id> (on Issue <issue-key> by '<user>' on <timestamp>). Reason: CommentBodyCharacterLimitExceededException: No message.
ERROR <project-key> project-import We couldn't import Issue <issue-key>. Reason: description: The entered text is too long. It exceeds the allowed limit of 32,767 characters..
Environment
This message applies to the Jira Cloud Migration Assistant (JCMA).
- From Server to Cloud
Cause
Currently, on the Cloud environment, it's not possible to bypass the 32,767 character limit for both description and comments.
Identify
To find the issues that may contain more than the allowed value on the Cloud, run the following queries:
SELECT p.pkey AS projectkey
, CONCAT(p.pkey, '-', ji.issuenum) AS issueKey
, ji.description
, LENGTH(ji.description) AS description_length
FROM jiraissue ji
JOIN project p ON (ji.project = p.id)
WHERE LENGTH(ji.description) > 32767
GROUP BY p.pkey, CONCAT(p.pkey, '-', ji.issuenum), ji.description
ORDER BY p.pkey, LENGTH(ji.description) DESC
SELECT p.pkey AS projectkey
, CONCAT(p.pkey, '-', ji.issuenum) AS issueKey
, a.author
, a.actionbody
, LENGTH(a.actionbody) AS comment_length
FROM jiraaction a
JOIN jiraissue ji ON (a.issueid = ji.id)
JOIN project p ON (ji.project = p.id)
WHERE a.actiontype = 'comment'
AND LENGTH(a.actionbody) > 32767
GROUP BY p.pkey, CONCAT(p.pkey, '-', ji.issuenum), a.author, a.actionbody
ORDER BY p.pkey, LENGTH(a.actionbody) DESC
Make sure to replace the <project-key> placeholder with the impacted projects.
These queries work for Postgres. You may need to adjust those to the other database flavors.
Solution
A few workarounds are available:
- Delete the comment from the server and re-migrate
- Split the comment (max 10k chars) in the server and re-migrate
- Extract the comment into an attachment in the server, attach to the related issue, and re-migrate