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 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
AUG Leaders

Atlassian Community Events