Example scripts
To homepage
Jira

Add Comment to an Issue with Visibility Restrictions
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira (8.0 - 8.19)

ScriptRunner For Jira (7.10.0)
Language |
groovy
def issue = Issues.getByKey('SR-1')
issue.addComment('My comment') {
// set the group that can view the comment
setGroupRestriction('jira-administrators')
// set the role that can view the comment
// setProjectRoleRestriction('Developers')
// for Jira Service Management projects, mark the comment as "Internal"
// internal()
}
Having an issue with this script?
Report it here