Versions Compared

Key

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

We are using velocity as template engine and have exposed the following classes:

  • current issue
  • issue manager
  • project manager
  • current project
  • current user
  • user manager

General usage note

Use $ sign to access the object, then use dot notation to access its variablesRINT allows custom variables that can be used when generating an integration request. Under the hood, we're using JSONPath and Mustache to extract and substitute variables for a RINT integration request.

It's currently possible to substitute the following:

  • Request URL
  • Request headers
  • Request body
  • Request Authorization

General usage

Variables are accessed by using the curly braces notation of Mustache. 

{{variable_name}} or for an object, the dot notated getter name without the "get".

Example: {{my_object.name}} . For the value of the getName() of the my_object variable

Value variables (Primitives/Strings ie.)

{{variable}} - Substitutes the variable value

Objects

{{object_name.user.name}} - Substitutes the object_name getUser().getName() value

Collections

Iterate through lists using the following Mustache pattern:

{{#title}}{{.}}{{/title}}

Default variables

Default variables that are available for every RINT integration request are:

VariableDescription
{{ now }}

Current date/time

{{ issue }}The issue that triggered the request. (or was in context of the scheduled job). Note: Scheduled RINT integrations will only have an issue if an issue context scope has been defined.

Defining custom variables from a response

You may define any number of variables from the response of the parent RINT integration that will be available for usage within the child's variable scope. 

Define custom variables by defining them in the variables section of the child integration.

Image Added


Set the variable name followed by the JSONPath expression.

See JSONPath for tutorials examples on how define your jsonpath for your use case.


User object

Use $user

VariableDescription
{{user.name }}returns the full name. Example Rickard Atthem
{{user.key }}returns the username. Example ratthem
{{user.email }}returns the email. Example rickard@rixter.se
{{user.active }}returns true or false depending on if the user is active or not in JIRA


Issue object

VariableDescription
{{issue.summary }}returns the issue summary
{{issue.key}}returns the issue key
{{issue.type }}returns issue type
{{issue.assignee }}returns the assignee. See User above for chained mehod invocations. Ie. {{issue.assignee.key }}
{{issue.reporter }}returns the reporter
{{issue.watchers }}returns a list of watchers such as: ["user1","user2"]
{{issue.affectsversion }}returns the assignee
{{issue.fixversion }}returns the assignee
{{issue.components }}returns the assignee
{{issue.labels }}returns the assignee
{{issue.resolution }}returns the assignee
{{issue.attachments }}returns the assignee
{{issue.comments }}returns the assignee
{{issue.worklog }}returns the assignee
{{issue.votes }}returns the assignee
{{issue.due }}returns the issue due date
{{issue.description }}returns issue description
{{issue.priority }}returns the priority of the issue
{{issue.created }}returns the created date of the issue
{{issue.updated }}returns the updated date of the issue
{{issue.status }}returns the status of the issue
{{issue.customfield_xxxxx}}returns the value of the custom field. example {{issue.customfield_10000}}


Current date/time

VariableDescription
{{now}returns the full name. Example Rickard Atthem

...