Cloning an issue with a sub-task fails with a DB exception if its summary has 255 characters

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

Summary

Problem

When trying to clone an issue with sub-tasks on Jira, the following error appears at the UI:

(Auto-migrated image: description temporarily unavailable)

Diagnosis

  • The summary from the issue that is being cloned does not exceed 255 characters

  • Errors with the following pattern appear in the atlassian-jira.log files:

1 2 3 ERROR: value too long for type character varying(255) STATEMENT: INSERT INTO public.jiraissue (ID, pkey, issuenum, PROJECT, REPORTER, ASSIGNEE, CREATOR, issuetype, SUMMARY, DESCRIPTION, ENVIRONMENT, PRIORITY, RESOLUTION, issuestatus, CREATED, UPDATED, DUEDATE, RESOLUTIONDATE, VOTES, WATCHES, TIMEORIGINALESTIMATE, TIMEESTIMATE, TIMESPENT, WORKFLOW_ID, SECURITY, FIXFOR, COMPONENT, ARCHIVED, ARCHIVEDBY, ARCHIVEDDATE) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30) 2021-04-23 12:54:55,126-0300 JiraTaskExecutionThread-1 ERROR rrosa 774x292x1 15mwema 127.0.0.1 /secure/CloneIssueDetails.jspa [c.a.j.bc.issue.DefaultIssueService] com.atlassian.jira.workflow.WorkflowException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Issue][summary,CLONE - This is a subtask with a lot of characters This is a subtask with a lot of characters This is a subtask with a lot of characters This is a subtask with a lot of characters This is a subtask with a lot of characters This is a subtask with a lot of charact][watches,0][creator,JIRAUSER10000][created,2021-04-23 12:54:55.122][timespent,null][timeoriginalestimate,null][project,10200][description,null][reporter,JIRAUSER10000][type,10003][priority,3][number,4][archived,N][environment,null][security,null][timeestimate,null][duedate,null][resolutiondate,null][votes,0][assignee,null][id,10403][updated,2021-04-23 12:54:55.122][workflowId,10403][status,10000] (SQL Exception while executing the following:INSERT INTO public.jiraissue (ID, pkey, issuenum, PROJECT, REPORTER, ASSIGNEE, CREATOR, issuetype, SUMMARY, DESCRIPTION, ENVIRONMENT, PRIORITY, RESOLUTION, issuestatus, CREATED, UPDATED, DUEDATE, RESOLUTIONDATE, VOTES, WATCHES, TIMEORIGINALESTIMATE, TIMEESTIMATE, TIMESPENT, WORKFLOW_ID, SECURITY, FIXFOR, COMPONENT, ARCHIVED, ARCHIVEDBY, ARCHIVEDDATE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: value too long for type character varying(255)))

Cause

JIra appends "CLONE - " or any defined string to the summary of all sub-tasks linked to the cloned issue, causing them to exceed the 255 character limit for this field. A bug report to handle this situation was created at the following page:

Cloning an issue with a sub-task fails with a DB exception if its summary has 255 characters

Solution

Resolution

Edit the summary from sub-tasks that will exceed 255 characters after including the "clone" prefix, ensuring that the new summary won't exceed the limit for this field.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.