Using scriptrunner to add an additional comment to existing resolved comment

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.


Script Console 1.PNG


bernard gorman


1 answer

Hi Bernard, I answered your question at the original post,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,721 views 17 21
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