JIRA 4.0 : Adding a Custom Event
This page last changed on Oct 01, 2009 by alui.
On this page: Overview of JIRA EventsJIRA uses an event-listener mechanism to alert the system that something has happened, and to peform appropriate action (e.g. send an email notification) based on the event that has occurred. Every issue operation within JIRA is associated with a particular event - e.g. the Issue Created event is fired when an issue has been created. A Listener can execute a specified action once it has been notified that a particular event has been fired. For example, the MailListener can send an Issue Created email to a list of recipients defined in the appropriate Notification Scheme, whenever an issue is created. Some events are fired by JIRA internally — e.g. an Issue Updated or Issue Moved event. Other events are fired from within workflow transition post-functions — e.g. an Issue Resolved event, or a Custom Event (see below). Event TypesThere are two types of events within JIRA:
An event can be in either of the following states:
System EventsJIRA's built-in system events are:
Custom EventsYou can fire a custom event from a custom transition post-function in a custom workflow. The appropriate listeners will be alerted of the custom transition by the firing of this event. For example, the associated notification scheme can be configured to notify users of the workflow transition based on the firing of this custom event. Configuring Notifications for a Custom EventCustom events are most commonly used to generate notifications for custom workflow transitions. For example, your organisation might need you to modify the default workflow by adding a workflow step called "QA_Inspection" (e.g. between "Resolve Issue" and "Close Issue"). You would typically also need to generate an email notification to the QA team whenever an issue progresses to the "QA_Inspection" step of the workflow. There are three overall steps to achieve this:
Step 1. Add a Custom Event
The custom event must be associated with a default email notification template. A notification scheme configured to notify users of this event will use this email template when sending the notification. The custom event will appear in the list of events defined within the system. Initially, the event will be marked as inactive as it is not associated with a notification scheme or workflow post-function. Step 2. Configure Notification Scheme to send mail on Custom Event
Step 3. Configure Workflow Transition Post-Function to Fire Custom Event
Updates to Workflows on DiskAs of JIRA 3.6, all event references are made through the EVENT ID. For pre-JIRA 3.6 data, all database tables (Workflow, Notification, etc.) are updated automatically. However, it is necessary to manually update event references in workflows saved to disk. This upgrade guide provides details on the changes required. ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
Document generated by Confluence on Oct 06, 2009 00:25 |