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.
Open the Smart Comment Templates panel
Go to the Variables tab
Click the Create Variable button
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.)
Enter the Default value of the Variable
Click the Create 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
Open the Smart Comment Templates panel
Go to the Variables tab
Click the Custom Variable Edit Icon
Enter the new Default value of the Variable
Click the Update button
Delete
Open the Smart Comment Templates panel
Go to the Variables tab
Click the bin icon in the Custom Variable row
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.