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,
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 }
It looks like you're new here. Sign in or register to get started.