Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section Column

Introduction to Groovy

Groovy is

an object-oriented programming language for the Java

an object-oriented programming language for the Java platform. It is

a dynamic language with

a dynamic language with features similar to those

of Python

of Python,

 Ruby

 Ruby,

 Perl

 Perl,

and Smalltalk

and Smalltalk. It can be used as

a scripting language for

a scripting language for the Java Platform. It is easy to learn, has smooth Java integration, vibrant and rich ecosystem and powerful features. To know more about Groovy, see

the 

the official Groovy Documentation.

On this page:

Table of Contents

Learning Groovy

To learn more about the Groovy language:

Groovy in JMWE

Groovy

script results

in JMWE

are

can be used

to:
Column
width350px
Panel
borderColorsilver
bgColor#f5f5f5
borderWidth1
borderStylesolid

On this page:

Table of Contents

Building Groovy scripts

You can learn writing groovy scripts either by going through the learning material or from the tutorials listed below:

Panel

Tutorials

  • Getting Started
  • My first Groovy script
  • How to write a script that returns a user
Panel

Learning material

  • Basics of Groovy - This document explains you some basic concepts of Groovy and provides references to Groovy tutorials.
  • Groovy editor - This section explains you

    either to write a Groovy expression or a Groovy template in the workflow extension configuration. 

    Groovy expression results in JMWE are used in:

    • All post-functions with the Conditional execution section to execute a post-function conditionally

    • Target issues section of all post-functions that operate on related issues when Issues returned by a Groovy script or Issues returned by JQL search is selected under Which Issues field.

    • Scripted (Groovy) operation on issue post-function to execute a Groovy script against an issue

    • Scripted (Groovy) Condition to execute a condition

    • Scripted (Groovy) Validator to execute a validator

    • Comment issue and Comment linked issues post-functions to create the body of the comment by selecting Groovy expression as the Comment type

    • Create/Clone issue post-function to

      • Calculate a project by selecting Calculated in Project

      • Calculate a parent issue key by selecting Calculated in Parent issue

      • Set fields of new issue by selecting Groovy expression as the Value type and 

      • Add a comment to the current issue by selecting Groovy expression as the Comment type

      • Multiple iterator section of the Create/Clone issue post-function

    • Set field value and Set field value of linked issues post-functions to set a field value by selecting Groovy expression as the Value type

    • Email issue post-function to

      • Write the Subject, HTML body, Text body

      • Set the Recipients from the script

    • Unlink issues from the current issue post-function to unlink issues based on the result of a Groovy condition

    • Admin screen to test/run Groovy scripts

    • Shared Groovy Scripts under JMWE administration

    Writing Groovy scripts in JMWE

    To learn how to write groovy scripts for JMWE, see:

    groovy
    • 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 - Interfaces of the available variables
    and
    you the tool provided to debug your Groovy scripts
    • the Groovy script tester which helps you test your written script or template and debug it.