Versions Compared

Key

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

...

The Groovy script tester in JMWE is available on the:

  • The Groovy script editor in JMWE is available on the:

    • Post-function configuration screen when you select:

      • Groovy expression/Groovy Template as Value type in the post-functions that set a field value

      • Groovy expression/Groovy Template as Comment type in the post-functions that comment an issue

      • the Conditional execution option in any post-function

    • Post-function configuration screen of the Create/Clone issue post-function when you select:

      • Calculated as Project

      • Calculated as Parent issue

      • Set field value from Groovy or Set field value from Groovy template while setting a field in Set fields of new issue

      • Groovy expression/Groovy Template as Comment type while adding a comment to the current issue

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

    • Post-function configuration screen of the Email issue post-function while writing the Email content and recipients

    • Post-function configuration screen of the Link issues to the current issue post-function while writing the JQL search expression

    • Post-function configuration screen of the Unlink issues from the current issue post-function

    • Configuration screens of the Scripted (Groovy) conditionScripted (Groovy) validator and Scripted (Groovy) operation on issue post-function

    • Groovy console admin screen that allows you to test/run Groovy scripts

    • Shared Groovy Scripts under JMWE administration

Using the Groovy Script tester

After After writing your Groovy script in the  in the editor, click on the Test Groovy Script Script button on the toolbar. A  A modal dialog window opens, asking you to pick an issue to run the Groovy script against, as well as a linked related issue, where wherever applicable. 

Selecting an issue

You can select the issue from one of the following options:

...

Selecting a linked issue/parent issue

In post-functions that process linked an issue’s related issues, after you select an issue (as explained above) in the tester, all all issues linked related to it through the link type relation selected in Issue linkWhich issue(s) are displayed under under Linked issue key. The linkedIssue variable  The relatedIssue variable and the deprecated linkedIssue variable used in your script will point to the linked issue you select. In the the selected related issue. For example: If the relation is the issues returned by the JQL search, the tester Linked issue key field will show issues that are a result of the JQL search.

In the post-functions that process the parent issue, after you select an issue issue (as explained above), its parent is displayed under displayed under Parent issue key. The  The parentIssue variable  variable used in your script will point to the parent the parent issue you select.

Testing your Groovy script

...