The Need: When a specific custom field is changed ("assignedTeam"), an email is sent to all members of the group listed in a group custom field (single select).
My Method:
The Problem:
I think my mistake is in the construction of the issueEvent/eventBundle (below). I think there should be some way to pass the change log to the constructor, but I just can't figure it out. Thanks.
Listener code:
if assignedTeam has changed...
{
Long EVENT_ID = new Long("10300")
IssueEventManager issueEventM = ComponentAccessor.getIssueEventManager()
IssueEventBundleFactory issueEventFactory = (IssueEventBundleFactory) ComponentAccessor.getComponent(IssueEventBundleFactory.class)
IssueEventBundle eventBundle = issueEventFactory.wrapInBundle(new IssueEvent (issue, null, event.user, EVENT_ID, true))
issueEventM.dispatchEvent(eventBundle)
}