Hey community
I've a problem, In my listener I need to change the selector when the user change a field.
In theory is easy when in a regular field, but in this case I need to change the field security level.
I've 3 levels in my security and I want to change depending of the user,
With this I can get the tree levels:
def result2 = get('/rest/api/3/issuesecurityschemes/10000/')
.queryString("overrideScreenSecurity", Boolean.TRUE)
.header('Content-Type', 'application/json')
.asObject(Map)
But now I need change the level in the issue.
Can you help me?
Thank's
Changing the security level based on user is quite simple,
just get the field option id for the security levels and set it like this:
import com.atlassian.jira.ComponentManager ComponentManager componentManager = ComponentManager.getInstance() User currentUser = componentManager.getJiraAuthenticationContext().getUser() if(currentUser.name == "akirk") { issue.setSecurityLevelId(10001) } else if(currentUser.name == "jojo") { issue.setSecurityLevelId(10000) }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.