Section | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
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
...