Using scriptrunner to add an additional comment to existing resolved comment

Bernard Gorman December 9, 2015

Hi Thanos and Nic (both at Adaptavist),

> If you have any questions or need assistance feel free to ask.

I am not a developer but willing to give it a go.

Please excuse my questions.

In our Jira Service workflow, the transition 'Resolve issue' exists going from the 'InProgress' state to the 'RESOLVED' state. Currently, when this transition is executed by one of our agents, it presents a small comment window to the agent. The agent then adds their resolution comment and once they are ready, they select the 'Resolve Issue' button. The issue then changes state to RESOLVED and sends an email to the customer.

The new behaviour I would like is:

1. Agent transitions ticket from InProgress to Resolved

2. Agent enters comment 1 into the comment field in the small window

3. scriptrunner adds comment 2 (my additional text) into the comment field in the small window

4. Agent selects 'Resolve Issue' button

5. Issue transitions to RESOLVED and a Jira Service Desk email is sent to the customer containing comments 1 and 2.

I have installed the trial version of scriptrunner and looked at the scriptrunner documentation together with your 2 suggestions (append generate comment and send custom email).

Some implementation questions (want to try out on our training server):

1. Given what I want to achieve, which of the 2 suggested approaches (append generate comment or custom email) would be preferable?

2. Looking at the sample code for 'append generate comment', is the language that a script is written in 'groovy'?

3. As a quick test, I took the sample code at the append generate link and pasted it into the scriptrunner script console which when ran produced an error message. (See attached screenshot).

Are there other item(s) apart from scriptrunner which I need to install before running thissmall code fragment?

Specific guidance on how to achieve this task would be much appreciated.

Thanks,

Script Console 1.PNG

 

bernard gorman

 

1 answer

0 votes
Thanos Batagiannis _Adaptavist_
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.
December 11, 2015

Hi Bernard, I answered your question at the original post, https://answers.atlassian.com/questions/85936/answers/32980659

Suggest an answer

Log in or Sign up to answer