Snippets

Adaptavist Jira Cloud Workflow Post Functions Example Conditions

Updated by Kristian Walker

File JiraCloudWorkflowPostFunctionsExampleConditions.groovy Modified

  • Ignore whitespace
  • Hide word diff
  */
 
 // Validate that a Checkbox field has a certain option selected
-((List)issue.fields.customfield_10063)?.collect { it.value }?.any { it == 'Checkbox1' } // Here you should replace customfield_10063 with the ID of your checkbox and Checkbox1 with the name of the option that you want to match. 
+((List)issue.fields.customfield_10063)?.collect { it.value }?.any { it == 'Checkbox1' } // Here you should replace customfield_10063 with the ID of your checkbox custom field and Checkbox1 with the name of the option that you want to match. 
Created by Kristian Walker

File JiraCloudWorkflowPostFunctionsExampleConditions.groovy Added

  • Ignore whitespace
  • Hide word diff
+/*
+ * "These lines of code can be added to the Conditions box in a workflow post function on Jira Cloud in order to specify a condition that must return true before the code for a script post function to be 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." 
+ */
+
+// Validate that a Checkbox field has a certain option selected
+((List)issue.fields.customfield_10063)?.collect { it.value }?.any { it == 'Checkbox1' } // Here you should replace customfield_10063 with the ID of your checkbox and Checkbox1 with the name of the option that you want to match. 
HTTPS SSH

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