/
Check Value of a Custom Field
Check Value of a Custom Field
Following script checks value of a custom field named “Single Line Text” and if it’s value is null it prohibits logging work to issue.
import com.atlassian.jira.component.*;
import com.atlassian.jira.issue.*;
import com.atlassian.jira.issue.fields.*;
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cfValue = worklog.issue.getCustomFieldValue(customFieldManager.getCustomFieldObjectByName("Single Line Text"))
if (cfValue == null) {
return "You have to provide a value for 'Single Line Text' custom field."
}
, multiple selections available,
Related content
Check Value Of Original Estimate Field
Check Value Of Original Estimate Field
Read with this
Checking Account Budget Overflow
Checking Account Budget Overflow
Read with this
Worklog Filter Script
Worklog Filter Script
Read with this
After Timesheet Approve/Reject
After Timesheet Approve/Reject
Read with this
Don't Allow Logging Work Under Specific Conditions
Don't Allow Logging Work Under Specific Conditions
Read with this
Make Account Mandatory
Make Account Mandatory
Read with this