Hi,
Using Behaviour, how can we check if Security Level field (which is a JIRA System field) is hidden on screen ?
This is rough so you would want to flesh out the logic, but in general this should work.
import com.atlassian.jira.component.ComponentAccessordef issue = getUnderlyingIssue()def sec = getFieldById("security")log.debug issue?.getSecurityLevelId().toString()log.debug sec?.getValue().toString()if (issue?.getSecurityLevelId().toString() == sec?.getValue().toString()) { log.debug "Security Level not hidden"} else { log.debug "Security Level hidden"}
There are other approaches (like using the Field Config API) but I think this one is very simple.
Hi. If this answer helped, please use the check mark to accept the answer. Thanks!
It looks like you're new here. Sign in or register to get started.