Page tree
Skip to end of metadata
Go to start of metadata

https://scriptrunner.adaptavist.com/6.1.0-p5/jira/behaviours-api-quickref.html?utm_source=product-help#_formfield_getvalue



常用语句

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager

// Get the current user
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
// Get the changed field
def exampleField = getFieldById(getFieldChanged())


if (ComponentAccessor.getGroupManager().getGroupsForUser(currentUser)?.find { it.name == "jira-administrators" }) { // <2>
    exampleField.setAllowInlineEdit(true)
} else {
    exampleField.setAllowInlineEdit(false)
}
  • No labels