Hello I am trying to write a Jython validator which compares a custom field value to a string. I have the following code:
from com.atlassian.jira.component import ComponentAccessor
cfm = ComponentAccessor.getCustomFieldManager()
location = issue.getCustomFieldValue(cfm.getCustomFieldObject("customfield_12032"))
if str(location).lower() == 'Business Trips'.lower():
result = False
description = "Please select whether this will be compensated by the customer"
invalid_fields['customfield_12032'] = "You need to select an option"
But it does not work.
Any ideas?