Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Swetha Bammidi May 7, 2014

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

1 vote
Deleted user February 25, 2015

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.

0 votes
Swetha Bammidi June 2, 2014

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

0 votes
Ivan Rey May 20, 2014

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

0 votes
BenjiI
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2014

Hi Swetha,

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

BenjiI
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2014

Hi Swetha,

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

BenjiI
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2014

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?!

BenjiI
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2014

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events