It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can Scriptrunner be able to update comments on linked issues?

JIRA: 7.1.8

Scriptrunner: 4.3.5

Service desk: 3.1.10

I am evaluating Service desk and I am using some of the workflow functionality of Scriptrunner to do some automation. The goal on this is to have a minimal effort in maintaining service desk issues and be able to communicate directly to the software/developer group and the user will stay in the service desk portal.


Use Case:

  • A user creates a request from service desk portal
    • Scriptrunner post function will clone and link an issue to a JIRA software project (no problem here)
    • Service desk project automation handles the changes on the linked issue status to update the issue status (no problem here)
  • Issue
    • Non-agent can't comment directly on the service desk issue, is there a way to comment in the JIRA software issue and automatically uploads that comment to the service desk issue?
      • This will allow the communication without a help desk personnel 



3 answers

Yes. This is possible. But, nontrivial.

There is an issueCommented event that can invoke a script listener. Since the script has full access to the JIRA API, you can navigate to the issue the comment is attached to, from there to the links and to the service desk issue where you want to replicate the comment.

Alternatively, you could give your non-agents the Service Desk collaborator role which only allows them to view service desk issues, and add comments and attachments. 

Thanks Doug,

The non-agents as a Service Desk collaborator can only comment internally not directly to the Service desk customer.

I tried these ones and its not exactly what I was looking for:

Script listener for Generic Event that fires off a "Comment" event if a comment was created




Given that you've tried some code, but it's not working, what is the behavior that's not working for you?

  • You successfully create the comment on the service desk issue but the comment is only internal and the customer can't see it?
  • The groovy code fails with an exception?
  • The groovy code never gets executed?
  • Something else?



To answer your question Doug:

  • I did a comment on the JIRA issue but it doesn't update/copy to the linked service desk issue
  • It seems like the groovy code was executing to what it's supposed to do, but as I said it's not doing what I was hoping to happen

Thanks for the time Doug 


To Jamie's comment:

  • In our company the help desk group are using Service Now and in our group we are using Atlassian products
  • It is a bad workflow for developers talking directly to users, I would prefer agents to be talking to users, but with our current structure, I don't have a dedicated service desk agent
  • I will try one more time to do the event listener on "issue commented" process, if it doesn't work then I will find another workaround or leave it as is

Thanks for the time Jamie 

You can have an event listener on "issue commented" in the software project, then use com.atlassian.jira.issue.comments.CommentManager#create to create the same comment on the software project.

You would have to create it as a service desk agent that has permissions on that project.

I would say this is not hard, but to me this sounds like a bad workflow. Let the agents speak to the users, and the developers speak to the agents, or get all the info they need from their dev ticket...?

It turns out that developers don't often use the correct language when speaking to end users, particularly if it's not even clear that their comment will be seen by the end user.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Apr 09, 2019 in Portfolio for Jira

Portfolio for Jira 3.0 is here!

The wait is over... Portfolio for Jira Server and Data Center 3.0 is now officially here! Platform releases offer Atlassian an opportunity to shift our strategy, make bold predictions about t...

1,515 views 14 26
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