Versions Compared

Key

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

...

Groovy Utilities

There are some utility variables provided by FlexDeploy that can be used in your custom Groovy code.

...

log is a FlexDeploy logger variable which should be used to log any information from the groovy class.

...

itsstatusmap is a map<id, name> which can be used for getting the ITS status names from status ids. This can be useful for getting and updating ticket statuses if the API for your custom issue tracking system uses status names only.

...

a number of functions available for use in your custom groovy implementation scripts. View suggestions while editing in the script editing windows by typing Ctrl + Space.

Class

Description

LOG

Functions for printing log messages to fd logs

REST

Functions for making REST API calls

Code Block
languagegroovy
def builder = new groovy.json.JsonBuilder()
def root = builder.issue

...

{
    notes "${pComment}"
}
String payload = builder.toString();

...

def 

...

client = 

...

REST.

...

getClient()

...

.url(REDMINE_URL + REDMINE_

...

REST_PATTERN

...

);
client.basicauth(REDMINE_

...

USER_

...

NAME, REDMINE_PASSWORD

...

);
client.put(payload);

LOG.info("Rest API create call successful");