Jira has a max length limit for description field and comments. By default if description is longer than what Jira accepts, Exalate sync gets stuck. We have been able to configure this so that whatever is left over after description becomes full will be spilled into a comment:
if (replica.description?.length() >= 32768) {
issue.description = replica.description.take(32767)
def overflowText = replica.description.substring(32767)
if (overflowText) {
def overflowComment = "Continuation of description due to Jira character limitations: \n" + overflowText
issue.comments = commentHelper.addComment(overflowComment, issue.comments)
}
} else {
// If the description doesn't exceed the limit, just set it normally
issue.description = replica.description
However we recently had a case where even that was not enough, and we would need the comment to spill into another comment. Would this be possible to do?
I found this earlier post Need to split source comment into multiple destination comments. (The entered text is too long.), but it didn’t cover how to actually implement a working solution for this.
We also have currently added this:
issue.comments = commentHelper.mergeComments(issue, replica, {it.body = it.body.take(32700); it})
into our incoming sync, just to avoid the sync from getting stuck again. But that doesn’t help with our intention of splitting the overflowing parts into multiple comments.
Any thoughts and insights about this would be much appreciated!