-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 7.13.3, 7.13.12, 8.5.3
-
Component/s: Issue - Fields
-
7.13
-
3
-
Severity 3 - Minor
-
1
Issue Summary
When reading in multi-line text field data from the database to display when viewing an issue, Jira serializes "\r" carriage returns into each line, artificially inflating the character count. If the field content is close to or meets the character limit, you will be unable to make any edits to the issue in the UI; the validator will throw an error indicating that the text entered for that custom field is too long.
Steps to Reproduce
- Create a new multi-line text custom field and add it field scheme of test project
- Create a new test issue
- Import the attached repro1.txt file via REST. You can copy and paste the Curl command from attached curl1.txt, substitute username, custom field ID, and issue key as needed.
- View the newly-created record in the customfieldvalue table and check the character count:
select textvalue from customfieldvalue where id = (select max(id) from customfieldvalue); select length(textvalue) from customfieldvalue where id = (select max(id) from customfieldvalue);
- Attempt to edit the issue in the UI, note the validation error indicating the field data is too long.
- Create another test issue
- Import the attached repro2.txt file via REST. You can copy and paste the Curl command from attached curl2.txt, substitute username, custom field ID, and issue key as needed. This is a much smaller file to demonstrate the injection of the carriage returns to the data.
- Check the record and character count:
select textvalue from customfieldvalue where id = (select max(id) from customfieldvalue); select length(textvalue) from customfieldvalue where id = (select max(id) from customfieldvalue);
- Navigate to the issue in the UI and edit the text in the the custom field to append a final "." character.
- Check the record and character count again
Expected Results
In the first test, Jira should allow you to save changes to the issue as the custom field data is at the limit.
In the second test, the character count of the field should only increment by 1.
Actual Results
In the first test, Jira serializes the "\r" characters into the field data, causing it to exceed the character count.
In the second test, you can see this character injection when reviewing the data in the customfield. The character count has grown more than the expected single character and you can now see the "\r" characters injected into the data.
Workaround
There has been no workaround identified at this time.