As you may have noticed, you can choose a mapping file that allows you to define your own mapping of exported custom fields into existent ones in the KIWI KIWI™ Import page.
Table of Contents |
---|
What is this file for?
It provides the app with rules that must be followed when mapping the custom fields you've exported into existent custom fields on the import instance. The mapping file is a plain text file that can be edited with any text editor.
Manually creating a custom field mapping file
- Create a new text file (choose any name) with the extension .cfmap in the following path: JIRA_HOME_FOLDER/kepler/kiwi
- Fill in the file with the mappings that you need
- Choose a custom field from your exported workflow that you want to be mapped, and get the custom field ID
- Get the custom field ID from Jira import instance into which where the exported custom field will be mapped
- Add a new line corresponding to the mapping in your mapping file as customfield_eeeee=customfield_iiiii, where customfield_eeeee is the ID of the custom field from the exported file and customfield_iiiii is the ID of the custom field from Jira import instance
- Repeat the operation for all the custom fields you want to map
...
The first row from the example above explains: "Map the custom field 10303 from my exported workflow into the custom field 11100 from this Jira system". The first column of the mapping file has the custom field IDs that you want to map from the exported workflow, and the second column contains the IDs of the custom fields from Jira server where the import is executed.
Import generated mapping files
A successful import will generate two mapping files: the current and the next mapping file in the JIRA_HOME_FOLDER/kepler/kiwi folder.
...
For both mapping files names <timestamp> represents the date at which when the file is generated, in the yyyyMMddHHmm format yyyyMMddHHmm.
To merge two generated CF Maps files, you need to use the corresponding tool.
Getting a custom field ID
Anchor | ||||
---|---|---|---|---|
|
...
4. Another way to get a custom field ID is by querying your data base if you have configured an external one.
Mapping error messages
If the mapping file has wrong mappings, error messages are displayed for the corresponding actions at Step 2: Actions.
...
- The exported custom field doesn't have the same type with the custom field that will be mapped to. In this case a message error appears:
- Two or more custom fields are mapped into the same custom field.
Both cases generate errors that won't let you to continue with the import until you fix them.
If your exported custom field were mapped several times in the mapping file, the last mapping will be used without generating any error message.
Tips and Tricks
The mapping file can force KIWI KIWI™ to avoid the automatic matcher for custom fields and create a brand new Custom Field with all its dependencies from the export system. To do this just map the custom field to the empty string (leave a blank after the equals sign) , like thisin the example below:
Code Block | ||
---|---|---|
| ||
customfield_10304 = customfield_10222 customfield_10309 = customfield_10316 = customfield_10327 = customfield_10406 |
This mapping file will force the creation on the Jira import instance of the custom fields 10309 and 10316 from the export file creation on Jira import instance.