Snippets

Adaptavist Script Listiner Conditions Jira Cloud

You are viewing an old version of this snippet. View the current version.
Revised by Kristian Walker 4ccb04e
/*
 * "These lines of code can be added to the Conditions box in a Script Listiner on Jira Cloud in order to specify a condition that must return true before the code for a script listiner is run
 * All right, title and interest in this code snippet shall remain the exclusive intellectual property of Adaptavist Group Ltd and its affiliates. Customers with a valid ScriptRunner 
 * license shall be granted a  non-exclusive, non-transferable, freely revocable right to use this code snippet only within their own instance of Atlassian products. This licensing notice cannot be removed
 * or amended and must be included in any circumstances where the code snippet is shared by You or a third party." 
 */
 
 // Ensure that the first value in a multi select list field is a specified value
 // The issue binding must be in the context for the event this webhook is running as in order to use this condition.
issue.customfield_12345[0].value =="Test" // Note here you should change customfield_12345 to be the ID of your custom field and change the value Test to be the value you want to match
 
 // Ensure that the value in a single select list field is a specified value. 
 // The issue binding must be in the context for the event this webhook is running as in order to use this condition.
 issue.customfield_12345.value =="Test" // Note here you should change customfield_12345 to be the ID of your custom field and change the value Test to be the value you want to match
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.