Problem:
I am encountering an issue while creating a Jira task using the Jira REST API. After investigating, I found that the issue arises from the task description field. The description contains a combination of special characters and text, with a character count of approximately 20,000. This seems to be causing problems when making the API request.
Request for Guidance:
Could someone please guide me on how to handle large descriptions with special characters effectively in Jira's REST API? Are there known limits on the description size or best practices to avoid such issues? Any advice on how to split the content or handle special characters properly would be appreciated.
We've used the REST API to import descriptions and comments of varying lengths. We've never had a problem with length, but we HAVE had a problem for special characters. Since the API expects your value in JSON, you need to escape those characters.
This stackoverflow post goes into good detail. For us, the biggest offenders were carriage returns and quotes. There are a lot of online tools that can change .csv or text to JSON format. That helped us do the bulk of it. We also were able to do a Find and replace in Excel for specific things.
It really depends if you're using the API sparingly to create, or more in bulk in an automated fashion.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.