Hi All,
We have a Server version of JIRA and JIRA Service Desk. We need to write a validator for a Field to check it's input - there should be comma-separated email-addresses. We have recently installed ScriptRunner. Is this the only tool for input validating?
There are other apps that provide validators, but because ScriptRunner lets you write code that hooks directly into the Jira API, none are quite as powerful as it is.
import com.opensymphony.workflow.InvalidInputException
def cf = ComponentAccessor.customFieldManager.getCustomFieldObjects(linkedIssues.first().destinationObject).findByName(<field name>)
if (issue.getCustomFieldValue(cf) <your rule>
{ throw new InvalidInputException("customField", "The content of <field name> is not a comma-separated set of valid emails") }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.