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?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.