I am trying to find out if I can disable the editing of a field when it is in a particular status. I have scriptrunner and wanted to know if this can be done with the scriptrunner behaviors.
import com.atlassian.jira.component.ComponentAccessordef field = getFieldByName("Priority Number")def customField = customFieldManager.getCustomFieldObject(field.getFieldId())def fieldConfig = customField.getRelevantConfig(getIssueContext())if (issueContext.projectObject.key != "INNP"){ field.setReadOnly(true) }
Hi @Joe Harmon
This article here does not say how to do it with Scriptrunner but might give you some ideas how this can be achieved without Scriptrunner.
HTH,KGM
Yeah those aren't going to work for me, but thanks for the suggestion. I know there is a way to set a field to read only with scriptrunner behaviors, but trying to find good script examples of doing that during while only in a certain status.
You don't know what the syntax for that would be do you?
def issueStatus = issue.getStatus().getName()
See what that gets you. VIA: https://community.atlassian.com/t5/Jira-Software-questions/Scriptrunner-listener-get-current-issue-data/qaq-p/1931114
Thanks, I'll try it out
It looks like you're new here. Sign in or register to get started.