Hello,
I am trying to set the description field to read only, when a specific workflow happens, and switch it back, when another workflow step occours.
I tried the following code with Scriptrunner Workflow functions. I do not see any errors in the History, but it still does not work, the description field stays editable.
import com.atlassian.jira.issue.IssueFieldConstants
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
final String fieldName = "description"
getFieldById(fieldName).setReadOnly(true)
Help is greatly appreciated.
Regards