Versions Compared

Key

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

...

Variable

Description

{{issue}}

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

{{now}}

Current date/time 

{{baseUrl}}

The Jira instance base url (since v1.0.1) 



Note

Upper case on "U" in baseUrl




{{#comments.all}}

Get all comments for the issue

Usage: {{#comments.all}} {{body}} {{/comments.all}} = Iterate all comments, print its body

Note: add more attributes or change {{ body }} to any other comment attribut, see Jira JavaDoc

{{comments.latest}}

Get the latest comment object for an issue. 

Usage: {{comments.latest.body}} = Latest comment body 

{{comments.latest.authorApplicationUser.displayName}} = Latest comment author name
See the Java impl of the Comment interface here https://docs.atlassian.com/software/jira/docs/api/7.1.5/com/atlassian/jira/issue/comments/Comment.html each method is accessible using dot notation without the get. example getId() is accessible using {{comments.latest.id}}

For JSM public comments see Send only public comments from Jira Service Management

{{customfield_id}}

Get custom field name.

example; {{customfield_10003}} is a field called "Multi User Picker"

When using  {{customfield_10003}} in the URL or Body it will resolve to Multi User Picker.

To get the value of the custom field use the {{issue.customfield_10003}}

{{currentUser}}

Returns the current user as a ApplicationUser object

{{responseHeaders}}

{{responseHeaders.myVariable}} gives the myVariable response header. Note only available on child actions, but seen on the parents execution log.

{{attachments}}

Get the issue attachment(s) as a list. Can be used to post the attachment to other systems see Attachments - Multipart data or Body and How to send an attachment for more info.
Get the latest or first use:

  • {{attachments.first}}

  • {{attachments.last}} same as latest

  • {{attachments.latest}}

Properties on a attachment:

  • content type String base64encoded, ex {{attachments.last.content}}

  • authorKey type String, ex {{attachments.last.authorKey}}

  • authorObject type ApplicationUser, ex {{attachments.last.authorObject.username}}

  • created type Timestamp, ex {{attachments.last.created}}

  • filename type String, ex {{attachments.last.filename}}

  • filesize type Long, ex {{attachments.last.filesize}}

  • id type Long, ex {{attachments.last.id}}

  • mimetype type String, ex {{attachments.last.mimetype}}

  • zip type Boolean, ex {{attachments.last.zip}}

...