Invalid license

Your Atlassian commercial license has expired. To keep using the app, renew or purchase a license from the Atlassian Marketplace or a Partner.

Using the Scriptrunner plugin:

 

import com.atlassian.jira.ComponentAccessor
import com.atlassian.jira.issue.comments.CommentManager
 
CommentManager commentManager = (CommentManager) ComponentAccessor.getCommentManager();
 
commentManager.create(issue, transientVars.context.caller, "Comment automatically generated...", false)