I added comment by
commentManager.create(issue, user, "Task transitioned BY ${currentUser.displayName}", false)
how to restrict comment visability by Project role?
Use this method instead:
commentManager.create(Issue issue, ApplicationUser author, String body, String groupLevel, Long roleLevelId, boolean dispatchEvent)
See for further information: https://docs.atlassian.com/software/jira/docs/api/7.1.4/com/atlassian/jira/issue/comments/CommentManager.html
Thank you for advice, Jack
But i'm not familiar with scripting, i can't understand how properly use it.
I have project role with id 13001, and try to do this:
commentManager.create(issue, user, "Task transitioned BY ${currentUser.displayName}",,13001, false)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe you need to put null on places where you want to specify any data, try:
commentManager.create(issue, user, "Task transitioned BY ${currentUser.displayName}",null,13001, false)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is the user you are using in the role 13001? Note that if not, you won't be able to see the comment.
it throws any error when executing the postfunction?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, i am in this role, but maybe there is some problem if role contains user groups?
No errors in transition logs, complete successfully
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.