Using Variables in Templates
Templates are only as useful as the content you can put in them. We understand that sometimes the content needs to be dynamic to adjust to the current context. This can be especially true in a support case, where you need to mention users, dates, and so forth.
To make Templates more useful, we've added support for variables. Variables allow you to designate a spot where a particular value should go when the template is inserted. We then evaluate the variable, and replace it with the corresponding value that the variable is mapped to.
For example, if your template has a variable of $assigneeName$
, we replace
that value with the display name of the current assignee of the ticket at the
time the template is being inserted.
Inserting a variable into a template is as easy as typing a $
and selecting
the template you want from the list. The general format is $variableName$
.
Variables are grouped into related sections. The full list of supported variables is as follows:
User Related Variables
Variable | Description | Example Result |
---|---|---|
$currentUser$ | @mention the current user | standard user mention |
$currentUserName$ | The display name of the currently logged in user | Anthony De Moss |
$currentUserFirstName$ | The first name of the currently logged in user | Anthony |
$currentUserAccountId$ | The Account Id the currently logged in user. This can be used to create dynamic @user mentions | |
$assignee$ | @mention the current assignee of the issue | standard user mention |
$assigneeName$ | The display name of the current assignee | Anthony De Moss |
$assigneeFirstName$ | The first name of current assignee | Anthony |
$assigneeAccountId$ | The Account Id the current assignee. This can be used to create dynamic @user mentions | |
$reporter$ | @mention the reporter of the issue | standard user mention |
$reporterName$ | The display name of the current assignee | Anthony De Moss |
$reporterFirstName$ | The first name of current assignee | Anthony |
$reporterAccountId$ | The Account Id the current assignee. This can be used to create dynamic @user mentions |
Date Related Variables
Variable | Description | Example Result |
---|---|---|
$date$ | current date | Wed Jun 09 2021 |
$time$ | current time | 20:36:40 GMT+0600 |
Issue Related Variables
Variable | Description | Example Result |
---|---|---|
$issue$ | Generates a link to the current issue | standard issue link |
$issueKey$ | The issue key for the current issue | ABC-1 |
$issueType$ | issue type of the current issue | New Feature |
$issuePriority$ | priority of the current issue | Major |
$issueSummary$ | the summary of the current issue. Note: this inserts the entire summary. | |
$issueDescription$ | the descriotion of the current issue. Note: this inserts the entire desccription. | |
$issueStatus$ | status of the current issue | In Progress |
$affectsVersion$ | list of affected versions for the current issue | |
$fixVersion$ | list of fix versions for the current issue | |
$components$ | list of componsens for the current issue | |
$issueCreated$ | date the issue was created | 2020-07-24T01:50:57.000-0400 |
$issueUpdated$ | date the issue was last updated | 2020-07-24T01:50:57.000-0400 |
$issueDuedate$ | date the issue is due | 2020-07-24T01:50:57.000-0400 |
Question: Can I mention custom fields?Not yet. It's something on our radar, and we expect to have that implemented in one of the upcoming releases.
Question: Can I mention attachments in a template?Not yet. See our attachments page for more details.
Project Related Variables
Variable | Description | Example Result |
---|---|---|
$project$ | A link to the current project | |
$projectName$ | Name of the project the issue is in | My Awesome Project |
$projectKey$ | Project key for the project the issue is in | ABC |
Misc Variables
Variable | Description | Example Result |
---|---|---|
$lorem$ | lorem ipsum dummy text |
Custom Variables
You can also create your own variables, with values defined by you.
The custom variables page has more details.
Useful Examples
@Mention the current assignee in a template: [~$assigneeAccountId$]