How to resolve the exception "com.atlassian.jira.exception.IssueFieldsCharacterLimitExceededException"
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Problem
This error might be noticed during the issue clone process when a System or Custom Field is higher than defined on jira.text.field.character.limit
Administration( ⚙ ) >System > General Configuration > Advanced Settings > jira.text.field.character.limit
Diagnosis
The access log shows the request for endpoint /secure/CloneIssueDetails.jspa
$JIRA_INSTALL/logs/access_log
1
127.0.0.1 684x838620x3 admin@acme.com [09/Aug/2022:11:24:18 -0400] "POST /secure/CloneIssueDetails.jspa- HTTP/1.1" 200 3183 123 "https://localhost/browse/ABC-123" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36" "1dc5hg2"
The application log shows the error
$JIRA_HOME/log/atlassian-jira.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2022-08-09 11:24:18,427-0400 JiraTaskExecutionThread-41 ERROR admin@acme.com 684x838620x3 1dc5hg2 75.180.50.170,127.0.0.1 /secure/CloneIssueDetails.jspa [c.a.j.bc.issue.DefaultIssueService]
com.atlassian.jira.exception.IssueFieldsCharacterLimitExceededException
at com.atlassian.jira.issue.managers.DefaultIssueManager.validateCreateIssueTextFieldsLength(DefaultIssueManager.java:521)
at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:492)
at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssueObject(DefaultIssueManager.java:602)
at com.atlassian.jira.issue.managers.RequestCachingIssueManager.createIssueObject(RequestCachingIssueManager.java:212)
at com.atlassian.jira.bc.issue.CloneIssueCommand.call(CloneIssueCommand.java:133)
at com.atlassian.jira.bc.issue.CloneIssueCommand.call(CloneIssueCommand.java:61)
at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:533)
at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:491)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216)
at java.base/java.lang.Thread.run(Unknown Source)
Cause
The Validation check is failing while the issue is being created (the clone triggers a new issue creation).
The Validation is on any System or Custom text field character limit and by default, the limit is '32767'.
Solution
1 - Check the value for jira.text.field.character.limit. Go to Administration ( ⚙ ) > System > General Configuration > Advanced Settings > jira.text.field.character.limit

2 - Running the SQL query below to identify if there is any System or Custom field higher than the 32767
For MySQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SELECT distinct p.pname as Project_Name, c.display_name as Lead, CONCAT( p.pkey,'-',i.issuenum ) AS Issue,
cf.cfname,
DATALENGTH(cv.TEXTVALUE) AS Custom_field_size
FROM project p,
customfieldvalue cv, customfield cf ,
cwd_user c,
jiraissue i
WHERE cv.issue = i.ID
AND p.id =i.PROJECT
AND cv.CUSTOMFIELD=cf.ID
AND p.lead = c.user_name
AND cv.TEXTVALUE IS NOT NULL
AND DATALENGTH(cv.TEXTVALUE) > 30000
ORDER BY Project_Name DESC;
For Postgres
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SELECT distinct p.pname as Project_Name, c.display_name as Lead, CONCAT( p.pkey,'-',i.issuenum ) AS Issue,
cf.cfname,
LENGTH(cv.TEXTVALUE) AS Custom_field_size
FROM project p,
customfieldvalue cv, customfield cf ,
cwd_user c,
jiraissue i
WHERE cv.issue = i.ID
AND p.id =i.PROJECT
AND cv.CUSTOMFIELD=cf.ID
AND p.lead = c.user_name
AND cv.TEXTVALUE IS NOT NULL
AND LENGTH(cv.TEXTVALUE) > 30000
ORDER BY Project_Name DESC;
3 - If the SQL query returns any result, review the issues and check which field could be causing the problem. If it's a Custom Field consider removing it
Was this helpful?