Creating a Template
This page is about Canned Responses Pro Templates for Jira Server/Data Center. Using Cloud? Click here.
On this page, you’ll learn how to create a template in Canned Responses.
It’s possible to create a template directly in the issue or on the configuration (Profile > My Canned Responses) page:
How to Access the Template Creation Screen
Canned Response Panel – Open any issue and click 'Comment' or type 'm' to go directly to the Comment field to see the Canned Response panel. Click the plus icon to create a new template.
Alternatively, you can open your profile to view all of your canned responses and add new ones. To do that, follow the steps below:
From the Jira top bar, click on your profile picture, then on Profile.
On the “My Canned Responses” screen, all of your personal templates will be displayed. Click Add response template.
You can also access the “My Canned Responses” screen by clicking the cog icon next to the Canned Response panel in the comment field:
How to Create a New Template
Now, let’s create a new template. After opening the Add response template screen by using one of the methods described above, follow the steps below and learn about each component:
1. Template name:
Enter a name for your template. This is the name you'll be searching for when using the template in one of the fields where Canned Responses is available.
Tip: You can group templates into a hierarchical structure using a double colon in the template name. For example, to put the "Deleting account" template in the "Instructions" folder, you can name the template Instructions::Deleting account
and it'll be nested accordingly.
2. Visibility scope:
The visibility scope indicates who will see this template in Jira issues. Template visibility can be restricted to you or shared with your teammates using Project or Global scopes. Depending on your role, you can create templates in one of three types of scopes:
Personal – visible (in issues) to a specific user only. Managed by the user and administrators.
Projects - visible for issues from selected projects. Managed by Jira Administrators (global permission), Project Administrators, and users granted the Manage Project Canned Responses project permission provided by Canned Responses. See Managing project permissions documentation for detailed information.
Global - visible to everybody. Managed by Jira administrators only.
For more information, check out the table below for the visibility scopes within Canned Responses:
| Jira Admin | Project Admin / Lead | Project User | Any User |
---|---|---|---|---|
Personal | MANAGE | MANAGE | MANAGE | MANAGE |
Projects | MANAGE | MANAGE | use | |
Global | MANAGE | use | use |
MANAGE Can administer, view, and use
USE Can view and use
Can't administer, view nor use
4. Response content:
Create any template content using the editor.
Macros
You can use macros, which are special keywords that will be dynamically replaced with proper data when the template is used, to generate contextual templates based on issue data. There are macros for all issue fields as well as custom fields.
Template View
Issue View
Canned Responses supports all Jira custom fields. Some of the most commonly used macros are listed below, along with examples of generated content based on issue data:
Macro | Example result |
---|---|
Special Macros | |
| 24/Dec/20 (produces current date) |
| Joe |
| John Doe |
| johndoe |
| (sets the cursor position after a response is inserted) |
| (inserts body of the latest comment visible to the current user) |
Standard Fields | |
| Joe Doe |
| janedoe |
| Jane |
| 01/20/2017 (defined in Jira Look and Feel settings) |
| 01/20/2017 7:45 AM |
| 1.2, 1.3 |
| 1.2, 1.3 |
| Create a list of all variables so that users can easily see them all in one place before installing the plugin. |
| John Doe |
| CT-198 |
| Highest |
| In Progress |
| Add "Supported Macros" section to the CT documentation |
| Task |
| Documentation |
| SEV-1 (produces the Severity rate in the custom field) |
| 20 Jan 2023 (produces the Due Date in the custom field) |
| Canned Responses |
| CT |
Sample Custom Fields | |
| Sample Sprint |
| 3.0 |
and all the others | |
User Custom Fields with Filters | |
| janedoe |
| Jane Doe |
| Jane |
| Doe |
Remote Links | |
| All outgoing remote links, regardless of type, comma separated |
| Remote links to Confluence content |
| Links to remote JIRA instances |
| Links to web pages |
Using @ mentions
Canned Responses for Jira also supported mentioning people while putting templates in comments. Jira uses markdown to generate rich comments, and we need to generate some markdown as well to make proper mentions. See the Jira WikiRenderer documentation. To create a mention for a user field:
Macro | Template content |
|
---|---|---|
Particular User | [~username] | username is Jira username of user you want to mention |
Assignee | [~$assigneeName$] |
|
Current User | [~$currentUserName$] |
|
Reporter | [~$reporterUserName$] |
|
User Picker (single user) | [~$Field Name_10000$] | Field Name and 10000 are Jira custom field name and id |
6. Save template
Click the Save template button to save your template. It’ll then be available in the dropdown menu of the Canned Response panel for easy insertion in future issues.
That’s all you need to know to start creating smart templates that save you time and increase efficiency.