1.2 Video: Using Behaviours in ScriptRunner for Jira Data Center/Server

For a written tutorial on behaviours, see the Behaviours Tutorial page. 

The scripts in this video can be found in the tabs below:

groovy
def desc = getFieldById("description") def defaultValue = """\ h3. Depending on the tour type, don't forget to use the type specifics below: * Use tour type specific assets * Use tour type specific filter * Highlight tour type specific ambience * Use tour type specific text templates h3. Don't forget to update your Dev Playbook after each QA Failure. """.stripIndent() if (!desc.formValue) { desc.setFormValue(defaultValue) }
groovy
def qaBrokenLinksField = getFieldByName("QA Broken Links") def failReasonField = getFieldById(getFieldChanged()) def selectedOption = failReasonField.getValue() as String def isBrokenLinksSelected = selectedOption == "broken links" qaBrokenLinksField.setHidden(! isBrokenLinksSelected) qaBrokenLinksField.setRequired(isBrokenLinksSelected)