Table of contents

A distribution job is a set of instructions for using specific channels to send certain alerts to Black Duck users. This section explains how you configure and manage these jobs.

About Distribution Jobs

You use the Black Duck providers and channels that you configure to create distribution jobs in Alert.

Go to the Jobs > Distribution page in Alert to define and manage your Alert jobs. When you create a distribution job, you create and save instructions for sending specific types of alerts to selected audiences. The Distribution page lists all currently saved jobs. From here, you can create, edit, or delete jobs. Selecting a project includes all versions of that project. You get alerts for notification that any version of a project configured in the distribution job generates. The notifications match notifications types configured in the distribution job. Alerts are sent through email, Jira Cloud, Jira Server, MS Teams, Azure Boards, or Slack.

When configuring distribution jobs, required fields are denoted by a red asterisk ( * ).

The notification types shown are for the selected provider in the distribution job. Therefore, only Black Duck notification types are available to select if you select the Black Duck provider.

The Distribution page contains the following fields, displayed in a table format. You can sort in ascending or descending order on any column heading.

When upgrading, distribution jobs that are configured incorrectly are disabled. 

Distribution jobs display an error under the following conditions:

In Alert versions, 5.1.0 and later, the Black Duck project and project version notification types are supported.

Creating a distribution job

Use the following process to create a distribution job. Required fields are denoted by a red asterisk ( * ).

  1. Navigate to Jobs > Distribution, click +New. The New Distribution Job dialog displays.

  2. To enable the distribution job, leave the Enabled checkbox selected or deselect the checkbox to disable the job.

  3. Using the Channel Type dropdown menu, select the job type; either Azure Boards, Email, Jira Cloud, Jira Server, MS Teams, or Slack.
    Notifications generated through Alert are sent using this channel. The New Distribution Job dialog expands to display the appropriate fields for the selected job type.
    Note: The distribution jobs display an error message when there are validation errors relating to global configurations.

  4. Complete the fields as follows.
    The following are common for all job types:
    Name: Enter a unique name for the distribution job.
    Frequency: Use the dropdown to select how frequently you want Alert to check for notifications to send: Real-Time as triggers occur or Daily.
    Provider Type: Select Black Duck. This displays additional fields, which are described in the following steps.

  5. Provider Configuration: Enter the unique name assigned to this provider configuration, which is configured on the Providers page.

  6. After completing the previous fields, additional fields display which are pertinent to your selected provider type:
    Notification Types: Select one or more types from the dropdown list. Only the selected notification types are included for this distribution job. Your selections display in the Notification Types box.

    - Click X at the right of a notification type to remove it from your selections.
    - Alert versions 5.0.0 and later support the BOM_EDIT notification.
    - In Distribution Job configurations with Black Duck selected as the provider, BOM_EDIT displays as an option in the dropdown selector for Notification Types. The BOM_EDIT notification is primarily used in Jira Cloud, Jira Server, Azure Boards to keep component information on issues as up-to-date as possible.
    - In Alert versions 5.1.0 and later, two new Black Duck notification types are supported: Project and Project Version. When selected, you are notified when new projects or project versions are created or deleted.
    - When used with Jira Cloud, Jira Server, or Azure Boards, the deletion of either project or project version triggers a Resolve Transition, when enabled, for all issues related to it.

    For information about notifications in Black Duck, refer to your Black Duck help pages:
    https://<hub-server>/doc/Welcome.htm#users_and_groups/managing_notifications.htm?Highlight=notification

    Notification types are as follows:
    - BOM_EDIT- changes to a BOM component such as updating its license or usage
    - PROJECT - projects are created or deleted
    - PROJECT VERSION - project versions are created or deleted
    - LICENSE_LIMIT - license restrictions are near or exceeding capacity
    - POLICY_OVERRIDE - policy is overridden
    - RULE_VIOLATION - policy violation
    - RULE_VIOLATION_CLEARED - policy violation is cleared (either the affected BOM component was deleted or the policy itself was updated)
    - VULNERABILITY - vulnerabilities introduced, updated, or removed.
    - COMPONENT_UNKNOWN_VERSION - a component is added to the BOM that does not have a version. 

    Processing: Select one of the following for how the notification message is processed:
    - Default: Displays the notifications as they are.
    - Digest: Displays a more streamlined version.
    - Summary: Only includes changes that have occurred.
    Note:
    In version 5.3.0 and earlier, the Processing field is labeled as Format.
    Important note:
    The Summary processing type was removed (Alert 6.2.0) as an option for the issue tracker channels such as Jira Cloud, Jira Server, or Azure Boards because of unexpected behavior with the created issues.

  7. Filter by Project: If selected, only notifications from the selected projects table are processed. Otherwise, notifications from all projects are processed. Selecting this checkbox displays these additional fields:

Note: Alert (ProviderDataAccessor) now retrieves Black Duck project and user data information directly from Black Duck rather than using the database tables in Alert.

The following fields are available in the distribution job depending on your selection for the Channel Type field:

Azure Boards

When you create a distribution job for the Azure Boards channel, ensure that the Azure project you are using in the Job is not using a template process. ou must create an inherited process and then change the project to use that new process. o change is required if the project is already using an inherited process.


Email

Project Owner Only cannot be set if Additional Email Addresses Only is set.

Email considerations

For email, one message is sent per project, rather than per project version. This occurs only if the notifications are processed in the same batch.

When projects are deleted, you may receive an email stating that a project has been removed even if you are not a member of that project. This may occur if a distribution job has multiple projects associated with the job and you are a member of one of those projects. When a project is deleted, eventually Alert removes the project data from Alert. This usually occurs between one and two minutes after the project is deleted. When this happens, there are no email addresses associated with that project in Alert. This means that Alert treats this scenario like a system-wide notification, and sends the notification to all other email addresses for the projects associated with the job. This happens when the distribution job is configured for a Daily frequency. For distribution jobs with Real-Time frequency, this does not happen. An example of a system-wide notification is license limit notifications.

Slack

Slack messages sent via Apps/webhooks use the App name and no longer support setting the sender username. Existing webhooks created before Slack made this change will still support setting the sender username.

When creating new webhooks the field Channel Username will have no effect and will instead show the name of the Slack Application that the webhook was created for.

MS Teams

Jira Server

In Alert versions 5.2.0 and later, you can configure distribution jobs to send notifications to the Jira server channel. Such notifications create new tickets, or update tickets matching the notification content. The ticket data displays in a format similar to an email or Slack message containing a single piece of data.

In Alert versions 6.10.0 and later, you must select the Jira server configuration name that is assigned, which is configured on the Jira Server channel configuration.

Alert only populates the custom fields when creating the ticket initially. When the Distribution Job changes to add more custom fields or change any of the values, these changes are not pushed to existing tickets.

To add a custom Jira Field.

After you have made your selections for the new distribution job, click Test Configuration. Clicking Test Configuration displays a dialog that is pre-populated with a default message.

Click Send Message to test the job configuration. You c customize the topic displayed in the message and the message content. When clicking Send Message, the configuration is validated and the contents are sent to the channel specified by the job.

If information is missing, the notification Required field missing displays in red above the affected field. Complete the required fields, and click Test Configuration. When the test is successful, click Save.

If you are using a Jira Data Center, use the Jira Server channel when you configure a distribution job in Alert. The Jir Server channel works for on-premise Jira Server installations, and Jira Data Center installations.

A non-admin Jira user (Cloud and Server) configured for Alert must have the following permissions for all Jira projects that Alert might need to update:

  • Browse Projects

  • Create Issues

  • Edit Issues

  • Assign Issues

  • Modify Reporter

  • Transition Issues

  • Resolve Issues

  • Add comments

Jira Cloud

In Alert versions 5.0.0 and later, distribution jobs can be configured to send notifications to the Jira cloud channel. Such notifications can create new tickets, or update tickets matching the notification content. The ticket data displays in a format similar to an email or Slack message containing a single piece of data.

The Transition requires the name of the transition from the workflow of the Jira Cloud project for which the distribution job is configured.

Alert only populates the custom fields when creating the ticket initially. When the Distribution Job changes to add more custom fields or change any of the values, these changes are not pushed to existing tickets.

To add a custom Jira Field.

After you have made your selections for the new distribution job, click Test Configuration. Clicking Test Configuration displays a dialog that is pre-populated with a default message.

Click Send Message to test the job configuration. You can customize the topic displayed in the message and the message content. When clicking Send Message, the configuration is validated and the contents are sent to the channel specified by the job.

If information is missing, the notification Required field missing displays in red above the affected field. Complete the required fields, and click Test Configuration. When the test is successful, click Save.

Example of a Jira Cloud distribution setup

The following is an example of a possible Jira Cloud job distribution setup.

There are no default values provided for Jira Cloud Resolve Transition and  Re-open Transition fields. If these fields remain blank, issues can still be opened and commented, but no transitioning occurs.

Alert requires the Reopen Transition field to transition to a status in the To Do status category, and the Resolve Transition field to transition to a status in the Done status category.

Transition names are case-sensitive, and must be entered exactly as they appear in the Jira workflows. For examp , if a transition name in Jira is Re-open issue and the transition name typed into Alert is Reopen Issue, this is not a match and is invalid.

Fields and recommended values for a Jira Cloud distribution:

Example workflow for this Jira Cloud job distribution setup:

Example summary for this Jira Cloud job distribution setup:

Updates to existing Jira Cloud tickets

After an issue is created, any notifications that match the Category value, such as Vulnerability or Policy and the Component and Component Version of that issue, are used to update the issue rather than create a new issue. Examples include, but are not limited to the following:

Additionally, a comment describing those changes is added to the existing issue when issues are updated.

Permissions - Jira Cloud

The Jira Cloud user configured for Alert is the user configured in the Jira Cloud Configuration tab and must have the following permissions to create issues for the target project:

The Jira Cloud user must also be an Admin user. Before the plugin creates Jira Cloud issues, it confirms that the Alert Indexer App is installed in the Jira Cloud instance, and this check requires Admin permissions.

For more information regarding permissions, refer to Atlassian: Managing Project Permissions.

Copying a distribution job

In Alert versions 5.0.0 and later, the Distribution table includes an additional column containing a copy button, located at the far right of each distribution job. This enables you to copy the configuration of an existing distribution job and configure new jobs quickly where only a small number of fields differ between jobs.

To copy a distribution job:

  1. In the Distribution table, click the copy icon at the far right of the job to be copied.
    The Copy Distribution Job dialog box is displayed.

  2. Edit the job as desired.

  3. In the Name field, assign a unique name.

  4. Click Save.

Identical distribution jobs that include transitions

If you configure two distribution jobs for Jira Cloud that are identical in their settings, and those settings include transitions, they will thrash. When one of the jobs transitions the issue, the next job will fail to transition the issue because the issue is already transitioned.

When resending a notification to a Jira Cloud distribution job from the Audit page, if that distribution job includes transitions and has already succeeded, then an attempt to resend a message to it fails because Jira Cloud has already executed the transition for that message. 

Editing a distribution job

  1. In Jobs > Distribution, click the Edit (pencil) icon at the right of the desired job. The Edit Distribution Job dialog displays. In Alert version 5.1.0 and later, double-clicking a row in the Distribution table opens the Edit Distribution Job dialog for the selected entry.

  2. Make the desired edits.

  3. Click Test Configuration to send a test alert to ensure values are valid.

  4. Click Save to save the edited job. Your changes are saved, and you are returned to the Distribution screen.

Deleting a distribution job

  1. In Jobs > Distribution, click the row of the desired job to select it.

  2. Click Delete. A popup asks you to confirm the deletion.

  3. Click Confirm. The job is deleted.