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 platform. It is a dynamic language with features similar to those of PythonRubyPerl, and Smalltalk. It can be used as 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 official Groovy Documentation.


Column
width350px


Panel
borderColorsilver
bgColor#f5f5f5
borderWidth1
borderStylesolid

On this page:

Table of Contents



...

...

Groovy can be used in JMCF to write a Groovy script in the Groovy Formula section of the custom field configuration and return the result of the evaluation. It is applicable to:

  • Calculated Date/Time custom field type, to return a java.util.Date
  • Calculated Duration custom field type, to return a duration String or a number in a Long format representing the number of seconds
  • Calculated Multi-select field custom field type, to return a String representing a comma-separated list of option values/ids or an array of option values/ids or a collection of option objects
  • Calculated Multi-user field custom field type, to return a String representing a comma-separated list of usernames or an array of usernames or a collection of ApplicationUser objects
  • Calculated Number custom field type, to return a number and to format the returned value in the Format expression field
  • Calculated Single-select custom field type, to return a String representing an Option value/id or an Option object
  • Calculated Single-user custom field type, to return a String representing a username or an ApplicationUser object
  • Calculated Text Field custom field type, to return a String representing a single/multi- line text.

Writing Groovy scripts in JMCF

...