Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using script runner to fire issue_commented when issue is updated?

Deleted user October 14, 2013

Hi,

I do not want to use the general "Issue Updated" from Jira since it causes my Jira installation to be verbose towards being spammy. Instead I rely on using "Issue Commented" and that works most of the time.

Jira has the annoying happit of sending an "Issue Updated" instead of "Issue Commented" whenever a customer sends an email with any kind of attachment. This means that all the customers who attach an image as part of their signature will cause Jira to send an "Issue Updated" instead of the Commented. The result is that I cannot get my AutoTransitionListener to reopen cases, jump out of the status "Waiting for customer" etc.

My idea was to use the Groovy Script Runner to issue the "Issue Commented" whenever an update included both an attachment and a comment, but I am all new to the script runner.

Unfortunately I cannot find the syntax for verifying that "There was a comment" as part of the update.

As far as I can see in various documentation, this would verify that there is an attachment in the update : "attachmentManager.getAttachments(issue).size() >= 1" or perhaps this could be used "issueFunction in hasAttachments ()".

But I cannot find an example of how to verify if this particular update had a comment in it?

Any assistance would be highly appreaciated.

Best regards

- Niels

2 answers

0 votes
DCS Purchases
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 7, 2015

This is a great question.  Does anyone have an answer to this?

0 votes
jeff poggensee October 24, 2013

Might try

List attachments = attachmentManager.getAttachments(issue)
if (!attachments.isEmpty()) {.........}

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events