Originally asked by Kyle K on 15 February 2024 (original question)
Is there a good way to split a single source comment into multiple?
I was thinking something like this, but I’m not sure if there is a function or something to push out multiple comments in a single sync.
static def JiraCharLimit(int commentLenght,String comment ) {
if (commentLenght < 32767 ){
//post comment
}else {
subcomment = comment.substring(0,32766)
recursecomment = comment.substring(32767,commentLenght)
//post subcomment
JiraCharLimit(recursecomment.lenght(), recursecomment)
}
}
JiraCharLimit(issue.comments.lenght(), issue.comments)