Behaviours allow you to change how fields behave on issue Create or Update screens. Using this script, you can set a field as hidden on these screens, so the user cannot see it.
As an admin, I want to hidden a field temporarily so users can't see it for a specified time. I use this script to make the field hidden for a set time, after which it is visible again.
1
2
3
4
5
6
7
8
9
10
11
12
13
import com.atlassian.jira.issue.IssueFieldConstants
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
final String fieldName = 'TextField'
// get field by name and hide it
getFieldByName(fieldName).setHidden(true)
// get a filed by id and hide it
getFieldById(IssueFieldConstants.DESCRIPTION).setHidden(true)