Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I create listener that send email when a custom field get change?

Eva
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 Leaders.
July 13, 2011

Hi,

I'm doing the similar concept as this post: http://forums.atlassian.com/message.jspa?messageID=257343585

Except I want to just send email to a group of users when a custom field is change from "coding" to "retest". From the forum, it seems like the best way to do is to create a listener. But the problem is if this custom field get updated via another post-function plugin (using OrdereableField.updateValue()), then woulnt the event wont be trigger via issueupdate event?

And since this is my first time creating listener, is there any good links with good examples (other than the ones form JIRA documentation)?

Thanks in advance!

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Eva
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 Leaders.
July 13, 2011

I actually end up using the build in listener script from Script Runner (Groovy Runner). Since OrderableField.updateValue doesnt fire teh IssueUpdate event (not sure why), I end up have to create a new event and add that to transition step so when my plugin update the custom value, that new event will trigger the listener and verified the condition and send the necessary email.

Jobin - thanks for your input though :) The listener that I created still doesnt work, probably b/c the IssueUpdate never get trigger. Anyhow, thanks :)

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 Leaders.
July 13, 2011

Hi Ewa - yes, the event won't be raised by updateValue. The other plugin could use IssueService.update(...), or use updateValue and raise the event itself.

0 votes
Jobin Kuruvilla [Adaptavist]
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 Leaders.
July 13, 2011

Yes, the event will be issueUpdated event. Have you seen this tutorial?

Eva
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 Leaders.
July 13, 2011

Hi Jobin - Yes I have read that tutorial and had created the listener as well, but it's still not emailing per update...so thats why I am not sure using issueUpdate is the approach I shoudl go with...

Jobin Kuruvilla [Adaptavist]
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 Leaders.
July 13, 2011

well, for emailing, are you throwing another event from the listener? You can dispatch an event using IssueEventDispatcher with the sendMail option as true.

Maybe use a custom event for which notifications are sent only to selected groups/people!

TAGS
AUG Leaders

Atlassian Community Events