Add projects and rules to a connection (4.2 and higher)

The final step in defining a connection is to map the projects in the master and target data sources that will synchronize, and to set up any rules that determine the scope of the data that will be included in the synchronization.

Versions: This topic relates to Micro Focus Connect versions 4.2 and higher.

For the Micro Focus Connect 4.0-4.1 method, see Add sync criteria and projects to a connection (4.0-4.1).

Overview

The Projects and Rules window contains two main sections: Common projects and data type rules. The sections are described in the table below.

Section Role
Common projects

Common projects are pairs of projects, from the master and target data sources, that you match together for synchronization.

For example, you define that Project A in the master data source will synchronize with Workspace 1 in the target data source.

You can define multiple common projects, meaning that the connection will synchronize several pairs of projects in the same two data sources.

For details, see Define common projects.

Data type rules

In the data type rules section you can define additional rules for the synchronization of the mapped data types.

Each data type mapping is represented in a separate row.

For each data type mapping you can define the following rules:

  • Set filters that determine which items are in scope for synchronization.
  • Define conditions and formulas that set field values of synchronized items.
  • Set different project mappings for each data type. By default, all mapped data types are synchronized between the same common projects.
  • Define additional project mappings for a data type set. For each additional project mapping, you can set different synchronization filters and calculated values.

For details, see Define data type rules.

Back to top

Define common projects

Common projects are the pairs of projects from the master and target data sources that take part in the synchronization.

By default, all the mapped data types are synchronized across the same common projects.

In most scenarios, you will want all the data types to synchronize between the same sets of common projects.

In such a case, define common project mappings in the Common projects section. In the data type sections, leave the default "Default Projects" selection.

To define common projects:

  1. Navigate to the Projects and Rules window in the create or edit connection wizard.

  2. In the common projects section, click Add Project Mapping.
  3. Select projects from the master and target data sources that you want to synchronize.

  4. Some SCM tools such as Git and Subversion allow you to specify a deeper directory level synchronization. If available, click the directory button . Enter the directory path.

  5. To add additional common projects, click Add Project Mapping.
  6. Project synchronizations are enabled by default. To disable synchronization for common projects, click the Enable/Disable Project Synchronization button.

Back to top

Define data type rules

You can define specific synchronization rules for each data type mapping.

If you do not define any rules for a data type mapping, all items in the mapped types will be synchronized between the sets of common projects.

You can set data type rules for either the master or target data sources, or both.

To define a data type rule:

  1. Navigate to the Projects and Rules window in the create or edit connection wizard.

  2. In the Data type rules section, locate the data type mapping for which you want to define synchronization rules.
  3. The default rule synchronizes all the type's items between the common projects.

    To add an additional rule for the same data type mapping, click Add Type Rule.

    For each additional rule for a data type mapping, you must select different project mappings.

    To edit a rule, click Edit connection type rule. The Edit Connection Type Rule window opens:

  4. Do any of the following:

    • Select the master and target projects to be synchronized for the current data type mapping. By default, the common projects are selected.

      To set a project mapping, click the Change project pair button for the data type rule, or select projects in the Edit Connection Type Rule window.

      Caution: Do not repeat the same project selection in the data sections as in the common projects. Doing so can lead to data duplication and other synchronization issues.

    • Define filters on the data types to limit the synchronization to a subset of items. In the Edit Connection Type Rule window, click a Sync Criteria link for the master or target. For details, see Build a query.
    • Define values that will be assigned to fields during their synchronization. In the Edit Connection Type Rule window, click a Calculated Value link for the master or target. For details, see Define calculated values.

Back to top

Build a query

Use the following steps to build a query for synchronization criteria or on the When and From statements of a calculated value:

  1. Click Add Child Criteria.

    The Add Term dialog box opens.

  2. Select the data source property from the Property Name list. For example: Blocked.
  3. Select an operator from the Operator list:

    Operator Description
    Equals The property equals the value.
    Contained in String The property contains a part of the value.
    Starts With The property starts with a specified letter or number.
    Ends With The property name ends with a specified letter or number.
    Contained in Set

    The property is contained within a set. Contained in Set is an OR operation. Examples:

    Value Set Result
    None 1,2,3 true
    2 1,2 true
    4 1,2,3 false
    2,3 1,2,3 true
    2,4 1,2,3 false
    Includes

    The property includes the value.Includes is an AND operation. Examples:

    Value Set Result
    None 1, 2, 3 false
    2 1, 2, 3 false
    2, 3 1, 2, 3 false
    4 1, 2, 3 false
    1, 2, 3 1, 2, 3 true
    1, 2, 3, 4 1, 2, 3 true
    Greater Than The property is larger in number than the value.
    Less Than The property is smaller than the value.
    Greater Than Or Equals The property is larger or equal to the value.
    Less Than Or Equals The property is smaller than or equal to the value.
    Is Descendant Of

    Use for items contained in an hierarchical tree, such as stories and requirements. For example: WorkProduct->Is Descendant Of Story.12, where 12 is the unique Story ID number. Also in this example is the feature of setting the criteria property as a chain. Use -> to indicate the property is connected by the sync criteria as either Is Decendant of or Instance Of. You can use either the Type Name and ID or just the ID. Separate the Type Name and ID with .. (two dots).

    Notes:

    • Excluding ancestors leads to excluding all of the descendant nodes.

    • Using the Is Descendant Of operator on a non-hierarchical data type can lead to unexpected results.
    Instance Of Use with Property or Type Name. For example: WorkProduct->Instance Of Story.
    Is Empty The property value is empty.
    Is New The asset is being created for the first time. This operator is not available when setting up a Synchronization Criteria query.
    Is Modified The asset has been modified. This operator is not available when setting up a Synchronization Criteria query.
  4. In the Field Value column, enter the value that the field must contain in order to be synchronized. For example: True. If you select the Is New or Is Modified operator, then the Field Value is not specified.
  5. Optionally, double-click another row to specify synchronization criteria for another field.
  6. Optionally, use one of the below query options to further build your query.

    Option Description
    Adds child criteria.
    Adds a child And/Or/Not node.
    Opens the edit mode to update criteria.
    Deletes the selected criteria.

Back to top

Next steps: