Introduction to Groovy
Groovy is an object-oriented programming language for the Java platform. It is a dynamic language with features similar to those of Python, Ruby, Perl, and Smalltalk. It can be used as a scripting language for the Java Platform. To know more about Groovy, see the Groovy Documentation.
On this page:
Groovy in JMWE
Groovy script results in JMWE are used to:
- Execute a post-function conditionally in all post-functions that have Conditional execution
- Execute a Groovy script against an issue in the Scripted (Groovy) operation on issue
- Execute a condition in the Scripted (Groovy) condition
- Execute a validator in the Scripted (Groovy) validator
- Create the body of the comment in the Comment issue and Comment linked issues post-function
- Calculate a project and a parent issue key, set fields of new issue and add a comment to the current issue in the Create/Clone issue post-function
- Set a field value in the Set field value to a constant or Groovy expression and Set field value of linked issues post-functions.
- Write the Subject, HTML body, Text body and Recipients in the Email issue post-function
- Write JQL search expression with Groovy template markup in the Link issues to the current issue post-function
- Unlink issues from the current issue based on a Groovy condition in the Unlink issues from the current issue post-function
- Test/run Groovy scripts in the admin screen
Building Groovy script
You can start writing groovy scripts by going through the below references:
- Basics of Groovy - This document explains you some basic concepts of Groovy and provides references to Groovy tutorials.
- Groovy editor - This section explains you the Groovy editor in JMWE where you can write your Groovy script.
- Variables used in a groovy expression - This document explains you the variables available for your Groovy scripts and how to create new variables in your Groovy scripts.
- Issue Interface - The document details the main issue interface
- Accessing the fields of an issue - This document explains you on how to access the fields of an issue.
- Expected value for each field type when the value type is a Groovy expression - This document lists the expected values for each field type of your issue.
Groovy script tester - This document explains the Groovy script tester which helps you test your written script and debug it.