5. Creating a New Configuration : Creating Field Mappings

Creating Field Mappings
Field mappings associate a field in an AccuWork issue with a field in an ITS issue -- Name with Name, Description with Description, and so on. During synchronization, the value of a field in one system replaces the value of the corresponding field in the other system depending on the synchronization type specified. See What is AccuSync™? for a simple illustration of this process.
Required Field Mappings for ClearQuest, HP QC, JIRA, and BMC Remedy
In addition to key and link field mappings, which are used to associate issue records in AccuWork and your ITS, ClearQuest, HP QC, JIRA, and BMC Remedy have several fields that are required in order to create issue records in their system. At a minimum, you must create field mappings for these required fields to ensure that issue records created in your ITS during synchronization are valid.
Tip: Create required field mappings as part of your basic mapping definition. This way, you only have to specify them once. See Base Mapping Definitions for more information on this topic.
ClearQuest: Required Field Mappings
HP QC: Required Field Mappings
JIRA: Required Field Mappings
BMC Remedy: Required Field Mappings
Field mappings required by BMC Remedy can be customized and will vary based on application type. Consult your BMC Remedy administrator for the fields required for your implementation, and then create at least those mappings in your BMC Remedy configuration.
Mapping Groups
In most cases, simply mapping one field to another provides AccuSync with all the information it needs to synchronize the fields’ values -- the issue description you enter in AccuWork can be added, as is, to the issue’s description in your ITS during synchronization, for example.
In some cases, however, your systems might use different values for the same field. Imagine a Severity field, for example. In AccuWork, this field might use values of A, B, and C to describe an issue’s severity. The same field in your ITS, however, might use values of Critical, High, and Moderate. In cases such as this, you need to define a mapping group to provide AccuSync with the information it needs to synchronize fields that use different values (A=Critical, B=High, and C=Moderate, for example).
Using a Mapping Group in a Field Mapping
You choose the mapping group you want to use for a field mapping at the time you create the field mapping. For this reason, you must create the mapping group before you create the field mapping itself. See Creating a Mapping Group for more information.
Note: Mapping groups are created at the AccuSync Configuration level and can be used by the field mappings of any mapping definition defined for the configuration.
Synchronization Types Inherited from Synchronization Pattern
Field mappings inherit the synchronization type (two-way or one-way) from the synchronization pattern associated with their mapping definition. If you want, you can override the synchronization type for individual field mappings. You might want to specify one-way synchronization for a particular field mapping and use two-way synchronization for the remaining field mappings in the mapping definition, for example. See Synchronization Types for more information.
Transformers
Transformers are bidirectional AccuSync utilities that convert values when synchronizing fields in one system with fields in the other. Transformers perform these conversions using predefined settings, except in the case of the Special Value Transformer, which uses the mapping group you specify. AccuSync includes several predefined transformers. You can also create custom transformers.
Predefined Transformers for All ITSs
AccuSync includes these predefined transformers for all supported ITSs:
AccuWork Change Package Data to String – Adds new lines to change package information to make the data more legible. For example, the AccuWork Change Package Data to String Transformer converts this change package information:
[id=3, type=text, element=/f1/s.txt, version=2/4, basisVersion=3/2] [id=4, type=text, element=/f1/r.txt, version=2/2, basisVersion=3/2] [id=5, type=text, element=/f1/newItem.txt, version=2/2, basisVersion=3/3] [id=6, type=text, element=/f1/123, version=2/1, basisVersion=3/2] [id=9, type=text, element=/f1/1234, version=2/1, basisVersion=3/1] [id=10, type=text, element=/f1/df, version=2/3, basisVersion=0/0] [id=11, type=text, element=/f1/123213123, version=2/1, basisVersion=0/0]
to this:
[id=3, type=text, element=/f1/s.txt, version=2/4, basisVersion=3/2]
[id=4, type=text, element=/f1/r.txt, version=2/2, basisVersion=3/2]
[id=5, type=text, element=/f1/newItem.txt, version=2/2, basisVersion=3/3]
[id=6, type=text, element=/f1/123, version=2/1, basisVersion=3/2]
[id=9, type=text, element=/f1/1234, version=2/1, basisVersion=3/1]
[id=10, type=text, element=/f1/df, version=2/3, basisVersion=0/0]
[id=11, type=text, element=/f1/123213123, version=2/1, basisVersion=0/0]
AccuWork Change Package Promote Data to String – Adds new lines to change package promote information to make the data more legible. See the description of AccuWork Change Package Data to String Transformer for an example.
Special Values – Uses the mapping group you specify to convert the value of a field in one system to an appropriate value in the other system. See Mapping Groups.
ClearQuest: Predefined Transformers
ClearQuest does not require special transformers.
HP QC: Predefined Transformers
HP QC does not require special transformers.
JIRA: Predefined Transformers
AccuSync includes these predefined transformers for JIRA:
AccuWork Change Package Data to JIRA Custom Field – Displays change package information in a JIRA custom field as HTML. Information includes element ID, file type, path, and actual and basis version numbers.
AccuWork Change Package Promote Data to JIRA Custom Field – Displays change package promote information in a JIRA custom field as HTML. Information includes transaction ID; date; user; type; element ID, path, and virtual and real versions; and comments.
JIRA User to AccuWork User – Uses the email suffix specified in the JIRA connection combined with the AccuRev user name to create the email name required for JIRA users. See Creating the AccuWork™ and ITS Connections for more information.
A mapping group, if specified, can be used to synchronize fields that take user names when the users were created with different names on the two systems (oarmstrong on one and owen.armstrong on the other, for example). See Mapping Groups for more information.
Special JIRA Values – Uses the mapping group you specify to convert the value of a field in AccuWork to an appropriate value for a JIRA custom field. See Mapping Groups.
Rally: Predefined Transformers
AccuSync includes these predefined transformers for Rally:
Rally Discussion to AccuWork Comments (Text) Transformer – retains any formatting used in Rally Discussion and AccuWork Comments fields.
Rally Username to AccuWork Username Mapper – for Rally to AccuWork synchronizations, strips the email suffix (specified as part of the Rally connection) from Rally usernames so they can be added to AccuWork. For AccuWork to Rally synchronizations, the email suffix is added to the username before the name is added to Rally.
For example, if @accurev.com is specified as the email suffix, when a Rally issue with the username hrondo@accurev.com is synchronized with AccuRev, the AccuWork issue is given the user hrondo. See Creating the AccuWork™ and ITS Connections for more information on specifying the email suffix.
Note: You can use a mapping group with this transformer to override its default behavior. You might need to do this if the same user was defined using different usernames on the systems you are synchronizing (jhasler on one, and haslerj on the other, for example). In this case, AccuSync would use the mapping group to ensure that jhasler was synchronized as haslerj, in addition to performing the usual email suffix conversion.
BMC Remedy: Predefined Transformers
BMC Remedy does not require special transformers.
Using Transformers
You choose the transformer you want to use for a field mapping in the Transformer field. You can associate a transformer with a field mapping when you create or edit the field mapping:
Some transformers are selected automatically based on the fields you map if they are specified for your ITS. For example, if you are using JIRA and map the owner field, AccuSync automatically selects the JIRA Username to AccuWork Username transformer.
If the transformer takes an argument, you specify the argument using the Transformer configuration field. Clicking the Configure Properties button displays the Mapping Groups page, which allows you to create a mapping group if one does not exist already.
Creating Custom Transformers
AccuRev includes a Java project you can use to create a custom transformer, which you can use to manipulate field mapping data as your needs require. The custom transformer Java project is installed to the userTransformersSampleProject directory where you installed AccuSync (c:\Program Files (x86)\AccuSync\userTransformersSampleProject\, for example).
To create a custom transformer:
1.
2.
AccuRev includes sample Java programs you can use to model your custom transformer. The programs are in userTransformersSampleProject\src\com\accurev\its\bridge\ where you installed AccuSync.
3.
4.
When the code compiles successfully, build the project from the command line using build.xml. This file is in the userTransformersSampleProject directory where you installed AccuSync.
The build process creates a .jar file in the userTransformersSampleProject\build directory where you installed AccuSync.
5.
Copy the .jar file to the transformers directory where you installed AccuSync.
The custom transformer is now available and appears in the Transformer drop-down list box on the Field Mapping dialog box.
Creating a Mapping Group
You need to create a mapping group for any field whose values differ across the systems you are synchronizing. You specify that mapping group as the argument for the Special Value Transformer when you create the field mapping for that field. See Mapping Groups and Using Transformers for more information.
To create a mapping group:
1.
Alternative: Select the AccuSync configuration and click the Edit Configuration button ().
The Configuration page appears.
2.
Click the Edit Admin Details button.
The Admin Details for Configuration page appears.
Any existing mapping groups are displayed in the Mapping Groups table.
3.
Click the New Group/Value button.
The New Mapping Value dialog box appears. The dialog box for JIRA is shown here; the dialog box for other ITSs contains the same fields.
4.
Click the New... button to define the new group.
The New Group dialog box appears.
5.
In the Group Name field, enter a name for the group you want to create and click OK.
The New Mapping Values dialog box reappears; the name of the group you just created appears in the Group field.
6.
In the New Mapping Values dialog box AccuWork value and ITS value fields, enter the value pair for this group. For example, a value of “A” in AccuWork might correspond to a value of “Critical” in your ITS.
7.
The new group is created. It appears in the Mapping Groups table with the value pair you specified.
8.
To add additional value pairs, click the Add Mapping Group Value button () in the Action column.
The New Mapping Value dialog box appears.
9.
10.
Repeat Step 6 and Step 7 for the next value pair.
11.
Creating a Field Mapping
This procedure describes how to create a field mapping.
Tip: If you are mapping fields whose values differ across the systems you are synchronizing, you must first create a mapping group for that field. See Mapping Groups for more information.
To create a field mapping:
1.
Alternative: Select the AccuSync configuration and click the Edit Configuration button ().
The Configuration page appears.
2.
The Mapping Definition page appears.
3.
The New Field Mapping dialog box appears. The dialog box for HP QC is shown here; the dialog box for other ITSs contain the same fields.
4.
In the AccuWork field and <ITS_name> field, choose the pair of fields you want to map.
Note: Fields required for your ITS are displayed with an asterisk in the drop-down lists.
5.
The default is two-way. If you choose one-way, you must also specify a value for the Master ITS field. The master ITS is the ITS whose data you want to use to update the issue records on the other ITS.
Note: By default, every field mapping inherits the synchronization type specified for the synchronization pattern to which the mapping definition belongs. You can override that synchronization type for an individual field mapping. See Synchronization Types Inherited from Synchronization Pattern for more information.
6.
Optionally, choose a transformer from the Transformer drop-down list for this field mapping.
Note: If you use the Special Values Transformer, you must specify the mapping group you want to use. To use an existing mapping group, choose one from the Transformer configuration drop-down list. If you have not already created the mapping group for this field mapping, click the Configure Properties button to open the Mapping Groups page. See Transformers for more information.
7.
Click the Map button.
The new field mapping appears in the table at the bottom of the dialog box.
8.
9.
The New Field Mapping dialog box closes and you are returned to the Mapping Definition page. The field mappings you created appear in the Field Mappings table. The table also displays type information for each of the mapped fields, as well as the synchronization type.
What to Do Next
Once you have created the field mappings for a mapping definition, you can define the synchronization pattern that uses the mapping definition. See Creating Synchronization Patterns.

Micro Focus