The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Groovy Script Runner - run script when the mail hanlder adding a comment

fuessldo
July 14, 2013

Hi,

is it possible to run a script when the "Create a new issue or add a comment to an existing issue" mail handler add a comment to an existing issue?

Thanks,

Dominik

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 15, 2013

You could try: https://jamieechlin.atlassian.net/browse/GRV-13

I don't think I got round to integrating that code.

Failing that you could add listeners, but I don't know how to distinguish events caused by mail handlers vs standard events. You could try checking transientVars and see if there is anything in there.

Globallink Techops
March 19, 2015

it's a bit of a hack but i've been using this to see if an issue was created with the mail handler: if ( Thread.currentThread().getStackTrace().grep(~/com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.*/) ) { // created via mail handler } else { // created some other way }

0 votes
fuessldo
July 15, 2013

Thanks, i will try https://jamieechlin.atlassian.net/browse/GRV-13

is there still a way to run a script when a comment is generally added? Regardless of where the comment is coming from ... mail handler, transition screens, ...

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 15, 2013