Example scripts
To homepage
Jira

Get Custom Field Value
Created 1 year ago, Updated 6 day(s) ago
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira
Language |
groovy
def eventWorkItem = Issues.getByKey(issue.key as String)
def expectedValue = 'some value you expect to see in the custom field'
//get custom field value
def value = eventWorkItem.getCustomFieldValue('customFieldName')
//clear custom field value
if(value != expectedValue) {
eventWorkItem.update {
eventWorkItem.clearCustomFieldValue('customFieldName')
}
}
Having an issue with this script?
Report it here