I have a requirement where user wants to restrict issue view only when a specific custom field value is *Yes*.
I know this is not directly achievable. Is there a way where I can implement the same?
You can use the set issue security built-in script to do this...
If you want to do it from a listener the code is just:
issue.setSecurityLevelId(secLevel.id)
Hello Jamie,
I implemented the security but still users are able to see the issue on Read-Only Mode. I want issue not to be visible when customfield value is YES.
Can you please guide further?
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
to 'clear' the security level you should
issue.setSecurityLevelId(null)
therefore you can have an (pseudocode)
if (cfValue == 'yes') { issue.setSecurityLevelId(null) } else if (cfValue == 'no') { issue.setSecurityLevelId(secLevel.id) } else { //something else }
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.