Variables
Variables are placeholders that are automatically filled with pre-configured data you need issues to contain.
We have two Variable types:
System Variables that will be filled in automatically
Custom Variables where you can create your own Default Value
System Variables
In case there is a need to use dynamically calculated data, we developed a set of system variables that can help with this task. These variables are used just as straightforward as regular variables.
At this point in time, the list of system variables includes:
Date and Time
$today - today’s date and time
$tomorrow - tomorrow’s date and time
$time - current time
$dateTime - current date
$nextWeek - a date that will be next week
User
$issueReporter - the user who is the Reporter of the Issue where the comment is applied
$username - the user who applies the comment
$userEmail - email of the user who applies the comment
Current Issue Details
$projectKey - the key of the project where the comment will be created
$projectName - the name of the project where the comment will be created
$projectLeadName - the leader of the project where the comment will be created
Custom Variables
Create
It is possible to create your own custom variable.
1. Open the Smart Comment Templates panel
2. Go to the Variables tab
3. Click the Create Variable button
4. Enter the unique value in the Variable name field
The Name must not contain spaces or a “$” symbol, i.e. (my variable - NOT allowed; myVariable - OK; $uperVariable - NOT allowed.)
5. Enter the Default value of the Variable
6. Click the Save button
All created Custom Variables will be shown after the System Variables in the Variables list
Edit
You can edit only the Default value of the Variable
1. Open the Smart Comment Templates panel
2. Go to the Variables tab
3. Click the Custom Variable name
4. Enter the new Default value of the Variable
5. Click the Update button
Delete
1. Open the Smart Comment Templates panel
2. Go to the Variables tab
3. Click the bin icon in the Custom Variable row
4. Click the ‘Delete’ button in the ‘Delete Template’ confirmation dialog
Once the Variable is deleted it will not apply its Default Value after the Comment Template will be added
How to use Variables
To start using Variables we have to add them in the Comment field when Creating or Updating or Comment Template. To do that we simply need to write a dollar sign - $ followed by the name of the variable we want to use. It is important to use the $ otherwise, the add-on will not understand what you are trying to achieve.
If Variables were added correctly, they will be filled in automatically after the Comment Template is applied.
Variables are an extremely powerful tool that can make the repetitive issue creation process way easier.