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 to write a Groovy script in the Groovy Formula section of the custom field configuration of aand return the result of the evaluation. It is applicable to:

  • Calculated Date/Time Field, such as Groovy expression returning a Date/Timestamp
  • , to return the result of the evaluation of a script, such as the addition of two other fields.
  • Calculated Number Field, to return the result of the evaluation of a script, such as the addition of two other fields.
  • Calculated Text Field, to return the result of the evaluation of a script, such as the concatenation of two other fields.
  • Calculated Duration Field, such as a Groovy expression returning a string representing a duration or a number in Long format representing the number of seconds
  • Calculated Multi-select Field, such as a Groovy expression returning a string representing the value of an option.
  • Calculated Single-select Field, such as a Groovy expression returning a string representing the value of an option.custom field type
  • Calculated Duration custom field type
  • Calculated Multi-select field custom field type
  • Calculated Multi-user field custom field type
  • Calculated Number custom field type
  • Calculated Single-select custom field type
  • Calculated Single-user custom field type
  • Calculated Text Field custom field type
  • Time in Status custom field type

Groovy can also be used to format the value of a Calculated Number Field.

Writing Groovy scripts in JMCF

...