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") }
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.