Groovy script tester availability
The Groovy script tester editor in JMCF is available on the Custom field configuration screen when you write a
Groovy script to return a value expected by the calculated custom field in the Groovy Formula fieldscreens of calculated custom field types that expect the result of a
Using the Groovy Script tester
After writing your Groovy script in the editor, click on the
Test Groovy Script button on the toolbar
. A modal dialog window opens, asking you to pick an issue to run the Groovy script against, as well as a linked issue, where applicable.
- Issue key: start typing an issue key, you will be offered options based on your issue browsing history
- [Select issue]: if you click on
[Select Issue], an Issue selector window gets displayed. You can select the issue either from:
- Recent Issues: Displays issues that you have recently viewed and first 50 issues from your current search or
- From Filter: Displays issues of your saved searches.
issue variable used in your script will point to the above-selected issue.
Message: Success/error message based on the test result.
- Result type: Data type of the result.
- Result value: Value of the result.
- Stack: If an exception was thrown during the execution of the script, a stack trace will be displayed.
- Logs: Information logged using the
Test a script that returns the sum of two number fields: