Clone wiki

jira-component-watcher-plugin / Home

Welcome

Welcome to the JIRA Component Watcher Plugin Wiki. This JIRA plug-in adds the ability to add users and groups as watchers to components. This does not add the users as watchers directly to the issues, just adds another method of notification.

warning Component watchers stored in version 1.0.1 are not compatible with other versions of the plugin. The method the watchers are stored has changed and will required manual re-enter of component watchers on upgrade.

warning Plugin version 2.5.0 saves component user watchers using user keys instead of usernames. It includes a task that automatically updates all existing component user watchers to use user keys. It is highly recommended to test upgrading the plugin in a testing, non-production, environment. Also, it is highly recommended to backup your JIRA database before upgrading.

Installation

Follow these instructions to install the plugin.

note Installation is different from JIRA 4.x and JIRA 5.x. Make sure you follow the correct installation instructions.

JIRA 6+

Due to changes in JIRA 6, the plugin now uses the "All Watchers" notification type for sending notifications. The "Component Watchers" notification type does not work in JIRA 6.  You must add the "All Watchers" notification type to all events in your notification scheme you want watchers to get notifications on.

  1. See the Installing a plugin from the Atlassian Plugin Exchange guide for installation instructions.
  2. Make sure that your notification scheme is configured to use the "All Watchers" notification type.

JIRA 5.x

Version 2.3.0 of the plugin does not require the modification of the notification-event-types.xml files. The plugin will now add the notification type "Component Watchers" on installation. Also, because of this, this version can be installed via the plugin exchange system and does not require a restart of JIRA. Yay!

  1. See the [Installing a plugin from the Atlassian Plugin Exchange guide for installation instructions.
  2. Make sure that your notification scheme is configured to use the "Component Watchers" notification type.

JIRA 4.x: Plugin versions 2.0 through 2.2

  • Download the jar file for your JIRA version from the marketplace and copy it to $JIRA_HOME/atlassian-jira/WEB-INF/lib
  • Add the following XML to the end of the $JIRA_HOME\atlassian-jira\WEB-INF\classes\notification-event-types.xml before the end tag (</types>). Be Careful Make sure you backup this file first!
<type id="Component_Watchers">  
    <class>com.burningcode.jira.notification.type.ComponentWatcherNotificationType</class>  
</type>
  • Restart the JIRA service.
  • Make sure that your notification scheme is configured to use the "Component Watchers" notification type.

Usage

The plugin is pretty easy and straight forward to use. The plugin is accessed from the project admin page under "Edit Component Watchers". There you will see a list of all the components for the project and the watchers associated with them. Click on the edit links for the components to modify their watcher lists.

Instructions

  1. Go to a projects administration page. Browse to the projects and click on "Project settings" on the bottom left.
  2. Click on the "Component Watchers" link.
  3. For each component you want to add users or groups to, click on the corresponding "Users" and "Groups" links.
  4. Follow the on screen instructions for adding the users and groups.

That should be it!

Note The component watcher plugin uses the "All Watchers" notification type. The notification type used can be changed, but, I don't recommend it. Note Users with "My Changes: Do not notify me" under the profile set will not receive component watcher notifications.

JIRA 4.4 and 5.x Users

The administration interface was changed in JIRA 4.4. To find the "Edit Component Watchers" link:

  • Go to "Administration"
  • Select the project you want to update
  • Click on "Actions" in the top right of the page
  • Click on "Edit Component Watchers".

Add Component Watchers Custom Field

This plugin includes a custom field for displaying and searching for component watchers.

To add the custom field, follow the directions from Atlassian guide for adding a custom field. Make sure to select "All" when at the "Select a Field Type" screen and select "Component Watchers Field Type".

Reports

Usernames to user keys report

Version 2.5.0+ saves component user watchers using user keys. It includes a task that will update all component user watchers from using usernames to user keys.

To assist with any possible edge cases, I created a report that can be used to compare component user watchers before the 2.5.0 upgrade with the current component user watchers.

To access...

  1. Go to "Administration" and click on the "Add-ons" tab.
  2. Under the "COMPONENT WATCHER" section, click on "Reports".
  3. Select the projects to view from the "Select a project" field.

Screen Shot 2017-07-12 at 2.57.41 AM.png

Settings

Changing Notification Type

By default, the Component Watcher Plugin will use the "All Watcher" notification type to identify which notification events to use. As of plugin version 2.5.1, you can specify which notification type to use.

To change...

  1. Go to "Administration" and click on the "Add-ons" tab.
  2. Under the "COMPONENT WATCHER" section, click on "Settings".
  3. Click on the "Edit Settings" button.
  4. Select the notification type to use or "None" to disable.

If you specify "None", the plugin will not send any notifications using emitted events. However, you can associated "Component Watchers" custom fields with events and which will then be used to send out notifications. Keep in mind, this method might be a bit slower.

Download Source

Run the following command from the command line to download a copy of the source.

git clone https://bitbucket.org/rbarham/jira-component-watcher-plugin.git

Updated