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.

Thanks,

Script Console 1.PNG

 

bernard gorman

 

1 answer

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

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,011 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot