Skip to main content
Book your demo
Example scripts
To homepage
Jira
Data centre icon
Data Center

Add Comment to an Issue with Visibility Restrictions

Created 2 year(s) ago, Updated 25 day(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
Jira (8.0 - 8.19)
compatibility bullet
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