5. Creating a New Configuration : Creating Mapping Definitions

Creating Mapping Definitions
A mapping definition is a collection of settings that describes how AccuSync synchronizes AccuWork and ITS issues. Examples of mapping definition settings include:
The issue type – You create a mapping definition for each issue type you want to synchronize. You might create one mapping definition for defects and another for tasks, for example.
Field mappings – You use field mappings to specify the AccuWork issue fields and ITS issue fields whose data you want to synchronize. For example, you might want to synchronize the content of the AccuWork issue Assigned To field with the content of the Owner field in your ITS. Depending on the allowed values for a given field, and whether those values are the same on both systems, you also might need to create a mapping group. See Creating a Mapping Group for more information.
Transformers – AccuSync uses transformers to convert values in one system to different values in the other. For example, valid user names in Rally systems are email addresses -- jdoe@accurev.com, for example. AccuRev usernames do not take this form, so AccuSync provides a transformer that strips the @domain_name suffix from Rally user names when synchronizing Rally artifacts with AccuWork issues, and vice versa.
AccuSync includes several predefined transformers, and you can create custom transformers using a Java project installed with AccuSync. See Transformers for more information.
Synchronization type override – The synchronization type determines whether AccuSync performs a two-way or one-way synchronization. By default, AccuSync uses the synchronization type specified for the synchronization pattern that the mapping definition is associated with. If you want, you can override the synchronization type for individual field mappings. See Synchronization Types for more information.
Filters – Filters provide a way for you to control which issues, or types of issues, are synchronized. For example you might create a filter that does not synchronize issues filed against a specific subsystem, or issues submitted by a specific user. You can define filters for both AccuWork and your ITS. See Creating a Mapping Definition Filter for more information.
Base Mapping Definitions
A base mapping definition is a mapping definition that contains a set of field mappings that are common to other mapping definitions. You can use a base mapping definition to speed the mapping definition process by reusing it as the foundation for more specialized mapping definitions, saving you the time and effort of manually redefining the same field mappings for each mapping definition you create.
For example, if your defect and story issues share a number of fields in common (issue number, short description, and comments, for example), you could create a base mapping definition called shared that specified those field mappings. You could then create the defect mapping definition and base it on the shared mapping definition. The defect mapping definition would inherit issue number, short description, and comments field mappings. Then, you could add to the defect mapping definition additional field mappings that are relevant only to defect issues -- such as severity, for example.
You create a base mapping definition as you would any other mapping definition. See Creating a Mapping Definition for more information.
Required Field Mappings: Key and Link
In order to synchronize AccuWork data with data in your ITS, AccuSync needs to be able to locate an issue record in one system and match it with (or create it in) the corresponding record in the other system. It does this using unique IDs, keys that identify issue records in each system. Unique IDs are also used to specify URLs, links that allow users of one system to access issues in the other.
Each mapping definition must be associated with key and link field mappings:
The key mapping lets you specify the AccuRev and ITS fields that store the unique ID that identifies each issue record.
The link mapping lets you specify the AccuRev and ITS fields that store the URL used to access an issue in AccuRev or your ITS.
There are two ways to include required field mappings with each mapping definition:
Regardless of which approach you choose, you always create required field mappings as part of the mapping definition. An abbreviated description of that process is described here. For more details, see Creating a Mapping Definition.
Other Field Mappings Required for ClearQuest, HP QC, JIRA, and BMC Remedy
In addition to key and link field mappings, you must create additional field mappings to satisfy requirements for valid issue records in ClearQuest, HP QC, JIRA, and BMC Remedy. See Creating Field Mappings for more information.
Creating Required Key and Link Field Mappings
Note: The values for the key and link fields are based on fields you added to the AccuWork schema; see Step 2: Set Up the AccuWork™ Schema for more information. Your ITS schema must also have been modified to store these values. If you are using JIRA, these changes are made for you by the JIRA plugin for AccuSync; see Step 1: Configure JIRA for AccuSync for more information. If you are using Rally or HP QC, see Step 4: Add AccuWork Fields to Your ITS Schema.
To create required key and link field mappings for a mapping definition:
1.
Alternative: Select the AccuSync configuration and click the Edit Configuration () button.
The Configuration page appears.
2.
The New Mapping Definition dialog box appears. The dialog box for JIRA is shown here; the dialog box for other ITSs contain the same fields.
3.
In the Name field, enter a name for the mapping definition.
Tip: If you are creating required field mappings as part of a base mapping definition, give it a name such as basic, common, or shared.
4.
Click the Create Key field button.
The Specify Issue Key Fields dialog box appears. The dialog box for JIRA is shown here; the dialog box for other ITSs contain the same fields.
5.
In the AccuWork field and <ITS_name> field fields, choose the schema values for the unique ID that represents the issue record on each system.
Tip: If you are using the default AccuWork schema installed with AccuSync, you can use the following mapping:
6.
The Specify Issue Key Fields dialog box closes.
7.
The Specify Issue Link Fields dialog box appears. The dialog box for JIRA is shown here; the dialog box for other ITSs contain the same fields.
8.
In the AccuWork field and <ITS_name> field fields, choose the schema values for the URLs that will be used to access the issue record on each system.
Tip: If you are using the default AccuWork schema installed with AccuSync, you can use the following mapping:
9.
The Specify Issue Link Fields dialog box closes.
10.
Creating a Mapping Definition
Use the following procedure to create a mapping definition.
Tip: You can create a new mapping definition by copying an existing one. See Copying a Mapping Definition for more information.
1.
Alternative: Select the AccuSync configuration and click the Edit Configuration button ().
The Configuration page appears.
2.
The New Mapping Definition dialog box appears. The dialog box for JIRA is shown here; the dialog box for other ITSs contain the same fields.
3.
In the Name field, enter a name for the mapping definition.
Tip: Consider naming the mapping definition for the issue type for which it is being created—story or defect, for example. If you are creating a base mapping definition that will be used with multiple mapping definition types, give it a name such as basic, common, or shared.
4.
Note: Change package synchronization is always one-way, from AccuWork to your ITS. Because of this, you should always create the mapping definition for the AccuWork issue type (defect or enhancement, for example) before creating the corresponding mapping definition for the change package. Doing so ensures that your ITS has an issue record to which AccuSync can write the change package information from the corresponding AccuWork issue.
5.
Optionally, in the Based on field, choose the mapping definition on which you are basing the mapping definition you are creating. If you specify a base mapping definition, the current mapping definition inherits all base mapping definition field mappings.
6.
In the AccuWork type and ITS type fields, choose the issue types that will be synchronized using this mapping definition.
7.
8.
9.
Click the Save button.
The Mapping Definition page appears for the mapping definition you just created.
The Required Field Mappings table displays the key and link required field mappings if they are defined for the mapping definition. (Otherwise, a message indicates that they are inherited from a base mapping definition). The Field Mappings table is empty, unless this mapping definition inherited field mappings from a base mapping definition, as shown in the preceding illustration.
What to Do Next
Once you have created the mapping definition you can specify the individual field mapping pairs you want to include in it. See Creating Field Mappings for more information.
Copying a Mapping Definition
You can copy an existing mapping definition. The copy feature can help speed the AccuSync configuration process as it allows you to easily reuse the field mappings and other settings associated with a mapping definition.
Note: You cannot copy a mapping definition if the synchronization pattern that uses it is running. See Stopping Configurations and Synchronization Patterns for more information.
To copy a mapping definition:
1.
Alternative: Select the AccuSync configuration and click the Edit Configuration button ().
The Configuration page appears.
2.
In the Mapping Definitions table, click the Copy button () for the mapping definition you want to copy.
The Copy Mapping Definition dialog box appears:
3.
The new mapping definition appears in the Mapping Definitions table.
4.
Click the Edit Mapping Definition button () for the new mapping definition and make any necessary changes.
Creating a Mapping Definition Filter
A mapping definition filter is a set of user-defined conditions that allows AccuSync to select the issue records you want to synchronize (or those that you want to omit from synchronization). For example, you might decide to create a filter to exclude from synchronization any issue submitted by a particular user, or to include in synchronization only those issues associated with a specific project. You can create a filter for AccuWork issues, ITS issues, or both.
Tip: See Considerations for Using Filters with HP QC for additional information about creating mapping definitions filters to work with HP QC.
Examples
Following are a few examples of simple filters:
(Rally only: The use of a filter is very helpful for specifying which Rally projects to exclude or include when Rally has nested projects.)
The AccuSync filter editor is similar to the AccuWork Query Editor. See your AccuRev documentation for more information.
How to Create a Filter
You can create a filter at the same time you define the mapping definition, or you can add a filter to an existing mapping definition.
To create a filter:
1.
The AccuWork Filter or ITS Filter editor appears. The AccuWork Filter editor is shown in this example.
2.
Click the Add filter button.
The Filter Record dialog box appears.
You use this dialog box to construct the conditions and clauses that define your filter.
3.
In the Filter Record Type field, choose condition or the AND or OR clause you want to create.
If you chose condition, go to Step 6.
If you chose AND or OR clause, click OK.
The clause appears in the AccuWork Filter editor. Go to Step 4.
4.
Click the New button () associated with the clause you just added.
The Filter Record dialog box appears again.
5.
Make sure the File Record Type field is set to condition.
6.
In the Specify Condition Details fields, construct the condition.
A condition has the following construction:
field name, condition, value
For example:
status = new
7.
The condition appears in the AccuWork Filter dialog box.
8.
To add another clause or condition, go to Step 4; in Step 5, specify the clause or condition, as needed.
9.
When you are done, click Save on the New Mapping Definition (or Edit Mapping Definition) dialog box.
Considerations for Using Filters with HP QC
AccuSync implements HP QC filters using the filter services provided by the HP QC REST API. HP QC filter services support the functionality summarized in the following table.
For additional information, refer to the HP QC REST API documentation.

Micro Focus