Hi
I've written a plugin to update our summary database with bits of information from JIRA. I have an eventlistener that does stuff when an issue gets created, updated or closed.
The method is pretty simple
{CODE}
public void onIssueEvent(final IssueEvent event) {
Long eventTypeId = event.getEventTypeId();
Issue issue = event.getIssue();
log.debug("Issue {}, generated eventtype {}", issue.getKey(),
eventTypeId);
// on insert or update
if (eventTypeId.equals(EventType.ISSUE_CREATED_ID)
|| eventTypeId.equals(EventType.ISSUE_UPDATED_ID)) {
log.info("Issue {} has been created at {}.", issue.getKey(),
issue.getCreated());
createSvr(event);
} else if (eventTypeId.equals(EventType.ISSUE_RESOLVED_ID)) {
log.info("Issue {} has been resolved at {}.", issue.getKey(),
issue.getResolutionDate());
} else if (eventTypeId.equals(EventType.ISSUE_CLOSED_ID)) {
log.info("Issue {} has been closed at {}.", issue.getKey(),
issue.getUpdated());
closeSvr(issue);
}
}
{CODE}
The problem is that it seems to detect successfully when a JIRA issue is created or updated, but the closed function never gets called.
I tracked an issue down in the logs for when it gets closed in the workflow and all I get is
Issue OPS-22979, generated eventtype 13
I'm not sure what eventtype 13 is but it certainly isn't invoking the closed code. The resolved code never seems to get called either.
Can anyone propose how I can successfully detect closure of tickets please?
Can you check in the workflow transitions post function that the 'Issue Closed' event is being fired when the issue is closed.
It may be possible that when issue is closed this event is not fired. Sorry , even I am not sure about eventtype 13
(I suspect that a generic event is being fired instead, Normally when the workflow is changed we forget to update the events accordingly and live with the generic event)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. It works for me too.
Set Workflow - transaction - Post Functions to "Fire a Issue Closed event that can be processed by the listeners." and now my notifications works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.