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.

Click to open the “Add response template” screen.
Create your own templates by clicking the icon next to either Personal or Global Templates. Once you create it, it will be filed under the corresponding category for future use.
  • 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

 

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

Macro

Example result

Special Macros

$date$

24/Dec/20 (produces current date)

$currentUserFirstName$

Joe

$currentUserDisplayName$

John Doe

$currentUserName$

johndoe

$cursor$

(sets the cursor position after a response is inserted)

$lastComment$

(inserts body of the latest comment visible to the current user)

Standard Fields

$reporterName$

Joe Doe

$reporterUserName$

janedoe

$reporterFirstName$

Jane

$createdDate$

01/20/2017 (defined in Jira Look and Feel settings)

$createdTime$

01/20/2017 7:45 AM

$affectsVersion$

1.2, 1.3

$fixVersion$

1.2, 1.3

$issueDescription$

Create a list of all variables so that users can easily see them all in one place before installing the plugin.

$assigneeName$

John Doe

$issueKey$

CT-198

$issuePriority$

Highest

$issueStatus$

In Progress

$issueSummary$

Add "Supported Macros" section to the CT documentation

$issueType$

Task

$labels$

Documentation

$Severity_10043$

SEV-1 (produces the Severity rate in the custom field)

$dueDate$

20 Jan 2023 (produces the Due Date in the custom field)

$projectName$

Canned Responses

$projectKey$

CT

Sample Custom Fields

$Sprint_10000$

Sample Sprint

$Story Points_10002$

3.0

and all the others

User Custom Fields with Filters

$User_10003$

janedoe

$User_10003|displayName$

Jane Doe

$User_10003|firstName$

Jane

$User_10003|lastName$

Doe

Remote Links

$remoteLinks$

All outgoing remote links, regardless of type, comma separated

$remoteLinks_wiki$

Remote links to Confluence content

$remoteLinks_jira$

Links to remote JIRA instances

$remoteLinks_web$

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

 

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.