Hi guys,
I have to hide/show a custom field (multiple group picker) in dependance of the chosen issue-level security during the issue creation. All I know - I have to create a ScriptRunner behaviour. But how can I get the value of the issue-level security and code the condition?
Any help is appreciated. Thx!
if (ComponentAccessor.getIssueSecurityLevelManager().getIssueSecurityName(underlyingIssue.getSecurityLevelId()) == "yoursecurityname"
) {
// your code
}
Thank you, Alexey!
But where should I put this code? And how can I hide/show a custom field? Should I declare or initialize something in this behavior in front?
Sorry for this noob-questions, I really appreciate your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should
1. Create a behaviour in the coq wheel -> add-ons -> behaviours.
2. Map the behaviour to the required project and issue types
3. Add the script to the initialize functions:
import com.atlassian.jira.component.ComponentAccessor
if (ComponentAccessor.getIssueSecurityLevelManager().getIssueSecurityName(underlyingIssue.getSecurityLevelId()) == "yoursecurityname"
) {
// your code
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.