Share this page

# Business rule actions

Following are the actions that business rules can perform.

In this topic:

## Add comment

Adds a comment to the item when the item is either created or updated.

## Add to stakeholder's My Work area

Adds an item to a user's My Work area. A user can be any of the stakeholder fields defined in the item, such as Author or Owner.

## Alert user

If an item matches the rule condition, an alert displays with a message that you define. The item cannot be saved until the user modifies the item so that it no longer matches the alert rule condition. Use this rule to prevent users from performing certain actions under certain conditions.

Submission mode: Select one or more triggers that cause the alert to be fired. Available triggers:

- An item is created

- An item is updated

- An item is deleted

- An attachment is added or edited

  For the attachment submission mode, the rule is triggered also when attachments are added to an item's memo fields or comments.

### Example:

Prevent testers from creating defects on old releases

## Block transition

Prevent users from transitioning from one phase to a specific phase, even though the transition is generally permitted in the workflow for the entity.

Tip: To define phase-dependent rules, open the Workflow tab, select a phase or transition for which you want to create a rule, and click the Rules tab.

### Example:

Prevent developers from closing a defect

## Make read-only

Makes fields read-only. If the rule is triggered, the selected fields cannot be updated.

Attachments: If attachments are made read-only by a rule, attachments cannot be added, edited or deleted in the affected item, directly or as images in memo fields and comments.

## Make required

Makes fields mandatory. If the rule is triggered, the selected fields must be filled before the item can be saved.

Example: Make fields required

## Modify lookup list

Change the available values for a list field or reference field.

### List field

Change the available values for a list field in one of the following ways:

- Use a subset of a list.

- Use different lists under different conditions.

Select the field and the list of values you want to use. If relevant, select a subset of values from the list in the Sublist field.

For details on creating lists, see Lists.

Examples:

- Set a subset of a lookup list

- Use different lookup lists

### Reference field

Change the available values for a reference field to include only the items that match a specified filter. For details on reference fields, see Reference fields.

Select the reference field and define the filter. For details, see Advanced filters.

The server validates submitted values for reference fields against the rule filter, including updates from API calls and bulk updates.

If a submitted value does not satisfy the filter, the update is rejected.

Example:

- Modify available values for a reference field

## Send email

Send an email upon the occurrence of selected events.

Submission mode: Select one or more triggers that cause an email to be sent. Available triggers:

- An item is created

- An item is updated

- An item is deleted

- A comment is added or edited

- An attachment is added or edited

  For the attachment submission mode, the rule is triggered also when attachments are added to an item's memo fields or comments.

The body of the email is generated automatically.

Email recipients can be specific users defined in the workspace, or users whose names appear in the user fields of the entity for which the email is sent. You can also define an entity's team as the recipient. An email is then sent to all members of the team. Or you can add stakeholders, such as team leads or team members of the teams set for the entity.

To send an email to stakeholders who are not subscribed users of the workspace, add them manually in the text box in the Send to section. Use a semicolon (;) as a delimiter between email addresses.

To add external email addresses to the Send to list, admins must enter the allowed email domains as values for the ALLOWED_EXTERNAL_EMAIL_DOMAINS parameter. The distribution list should also be configured to accept emails from outside of their domain. For details, see Configuration parameters.

Tip: Use this capability to send emails to a channel, such as in Slack or Microsoft Teams. In your application, obtain the channel's email address and enter it in the Send to section.

### Example:

Send an email when an item is updated

## Set field value

Updates a field's value in one of the following ways.

Method | Details
--- | ---
Set a fixed value | Assigns a fixed value to the field.
Set a value using a formula | Assigns a value dynamically based on other field values using JavaScript expressions. For details, see Value formulas.
Copy a value from another field | Copies the value from another field.
Clear a field's value | Empties the fields value.

### Timing

The trigger that causes the field value to be set. Select one of the following timings:

Timing | Description
--- | ---
When creating an entity | The field value is set when the Add dialog box is opened, or when duplicating or splitting an item.
When updating a field | The field value is set when another field is updated. To add a validation for API operations, see Business rule actions. Note: the action triggers as the field is being edited. There is no validation that the new field value is different than the old field value. To force a validation that the field value has changed when updated by an API operation, in the Condition tab, add a condition on the selected field using the is modified operator. For details see Business rule actions.
When saving an entity | The field value is set when a new item is saved, an existing item is edited, or an item is duplicated or split.
When a related entity in the condition is added or removed | In the rule condition, use the Children count field. The business rule triggers when the Children count value changes, upon a related item being added or removed.

### Special field values

There are some special field values that you can set:

- If the action sets a user field, you can select the [Current User] to set the field to the currently logged-in user.

- Increment an integer or date field by a certain amount. Available only with the When saving an entity timing.

### Examples

- Count the number of times defects are re-opened
- Record the Last Modifier of a manual test

- Set default field values (Set Field Value)

- Set a value when a related item changes (Set Field Value)

## Show/Hide fields in form

Adds or removes fields from a form in different scenarios.

Select which fields to show or hide in entity forms based on workspace-specific needs. This enables you to use shared forms in each workspace, while providing the means to customize the form to meet your team's unique requirements.

You can choose where a field is displayed in relation to other fields on the form: before, after, or in the default position. If you choose to show a field that is not displayed by default, it is displayed in the More section of the form.

Fields are displayed in the form according to the order of selection.

- If fields are already placed in the form due to other business rules, their position is changed according to the Show/Hide field rule. This means that the Show/Hide field in form business rules are always triggered after the Use form business rules, regardless of the order in which they were created.

- If a user modifies the form affected by the Show/Hide field rule, the next time the user opens the form, the fields are displayed according to the user's changes, rather than following the business rule.

You can select up to 10 fields to show or hide in the same business rule.

Examples:

- Show or hide specific fields in entity forms

## Trigger webhook

Webhooks are supported for integrating with other applications. Configure the webhooks by creating a rule with the Trigger webhook action.

Configure the following:

- The events that trigger the webhook

  In Submission mode, select one or more events that trigger the webhook. Available events:

  - An item is created

  - An item is updated

  - An item is deleted

  - A comment is added or edited

  - An attachment is added or edited

    For the attachment submission mode, the rule is triggered also when attachments are added to an item's memo fields or comments.

- The connection to the URL

  The URL of the service application that receives the webhook. Enter a valid, accessible URL.

  Click Test Connection to verify the connection is successful.

- Credentials

  Trigger Webhook rules support basic authentication. You can set credentials in the Trigger Webhook rule and each Trigger Webhook request includes the basic authentication header.

  Credentials is the user name and password that are used to authenticate the request, typically using basic authentication.

  For details, see Credentials.

  Click Test Connection to verify the connection is successful.

- The request payload

  By default, the following fields are sent in the payload:

  - ID

  - Type

  - Modified fields, including the original and changed values

  Use Fields to select additional fields to send in the request payload.

  Example:

  Trigger webhooks (call a URL)

  For details, see About the webhook request payload format.

For end-to-end instructions on working with Trigger Webhook rules, see Trigger webhooks for other applications.

## Use form

Enable users to select different form layouts for adding and editing entities.

The form layout must be predefined in Customization > Forms.

Example: Switch forms

https://admhelp.microfocus.com Software Delivery Management 8942
Tips to improve your search results... OpenText™ Software Delivery Management Help Center OpenText™ Software Delivery Management Help 26.3 All View Local Help Center View Online Help Center Version: