Is there any way to select Pre-configured Canned Responses during workflow transition(Screen)

Is there any way to select Pre-configured Canned Responses during workflow transition(Screen) such that users could be able to select appropriate Canned Response during workflow transition itself.

4 answers

Perhaps you will find our add-on Canned Responses for JIRA helpful. It is not triggered by transitions but does work well with JIRA and JIRA Service Desk

You can compose pre-defined responses for global, project specific or personal use (personal templates are free to use). Except for saving copy-paste time you have auto-fill of issue specific information like reporter name, assignee name, issue key, project key and many others including custom fields.

Hi Swetha,

What do you mean by 'canned responses'? Do you mean something like automatic responses when a certain workflow transition has been taken?

Hi Swetha,

First of all I think this is not really a Service Desk related question, but more of a JIRA workflow solution.

8) The script will look something like this (might contain syntax errors):

import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.customfields.CustomFieldType
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.comments.CommentManager
ComponentManager componentManager = ComponentManager.getInstance()
CustomFieldManager customFieldManager = componentManager.getCustomFieldManager()
CustomField cf = customFieldManager.getCustomFieldObject("customfield_10300") // This is the id of your select list custom field  
Object commentType = issue.getCustomFieldValue(cf)
// Check which comment was selected by the operator 
String comment = "";
if(commentType.equals("comment1")) {
    comment = "This will be the first comment"; // Place your text here
} else if(commentType.equals("comment2")) {
    comment = "This will be the second comment"; // Place your text here    
} else {
    comment = "This will be a default comment"; // Place your text here

// Add comment 
CommentManager commentManager = ComponentAccessor.getCommentManager();
commentManager.createComment(issue, "author", comment, true); // 'true' will throw an event when the comment is added

A new comment will be added to this issue when this workflow transition is taken. Since all comments in the issue are also directly visible in Service Desk, the customer/client will also see the canned response there.

Hope this helps?!

Hi Swetha,

This is a way to do it:

1) Setup your Service Desk and link it to your project

2) Create a workflow (or multiple worflows) for all issues that need this pre-configured comments. Make a workflow scheme and add the scheme to your Service Desk project

3) Create a custom field of type Select List (single choice) and add all the options you need (in this example comment1 and comment2)

4) Create a new custom screen and add the custom field from step 3 to it. This screen will be used during a workflow transition to allow the users to select the comment

5) Goto your workflow, select the transition where the comment has to be entered, click the edit button and select the screen from step 4. Whenever this transition is taken JIRA will first display a screen to the user where he can select the comment he want. The screen will also have a comment field, but that is inevitable.

6) Install the script runner plugin. This will add a new post-function that can be added to your transition where you can execute a Groovy script. This script will check the combo box choice and add the required comment.

7) Add a Script Post-Function to the workflow transition and write a custom script for this transition. You can point to this script in the Script file path field.

I believe he means just some predefined paragraph to add to the comment that the user can later edit to customize the response. It helps to give nice standarized responses to common situations

Canned Responses is a feature of Email this issue plugin. Here we can configure messages and in an issue when you click on Email button it prompt you to pick one of the preconfigured canned message. Like that do we have any solution to pick these canned responses during the workflow transtion

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 13, 2019 in Jira Service Desk

What's new in Jira Service Desk Server: Introducing 4.0 & more - Feb 2019

Hello Atlassian Community!  I'm Teresa, the Product Marketing Manager   for Jira Service Desk Server at Atlassian. I'm excited to announce two exciting releases for Jira Service De...

373 views 1 1
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you