Identity attributes cannot be imported as an identity attribute. If you attempt to do this, you will receive a warning "You cannot explicitly set values of identity attributes". This is because identity attributes are auto-generated, and it would cause a problem if you imported, for example, a Requirement ID value for an item that already exists for another item in the target/destination database since they are supposed to be unique values. To import an identity attribute, you must first create a string-type attribute in your target meta model and then import the identity attribute values to the new string attribute via mapping in the XML import file. 


Note: As a general rule, it is recommended that users always complete an analysis of the data to be imported before performing the import. Things to be considered are, for example, the source and destination meta models, the destination library, Foreign id, is this a one-time import or incremental import, etc. This analysis can help you avoid the extra cost of a potential clean-up of the data afterwords.


Creating a New Attribute of Type String 

First, you need to create a new string-type attribute in the target database. You can use any SID and Name, e.g., Foreign ID. Or, you can reuse an existing string attribute.  How to create attributes is described in Creating Attribute Types.


Importing to a String Attribute

In the XML Import configuration, use the tag <AttributeType>. The optional <AttributeType> replaces the attribute type SIDs of attributes in the imported file from the "from" attribute value to the "to" attribute value. See the example below:


<ImportFromXMLConfigs>
  <ImportFromXMLConfig id="default" sid="I">
...
    <MetaDataConversion>
.....
      <AttributeType from="SID1*" to="SID2*"/>
    </MetaDataConversion>
  </ImportFromXMLConfig>
</ImportFromXMLConfigs>

*SID1 is the attribute SID of type Identity, and SID2 is the attribute SID of type String that you want to map SID1 to.


One important thing to take in to consideration when doing the above is whether or not you have already proceeded with importing data without the identity attribute after receiving the warning.


If you already did an import for the data without the identity attribute and now you want to do a second round import, there are two different scenarios based on the Status of the imported data.

Scenario #1: if the data that you already imported is "Released/CS_Released", then doing a second import will force a new version for the existing data.

Scenario #2: if the data that you already imported is in "Work" status, then it will just be updated (NO force of new version).


If you released the data that you imported, our recommendation is to delete the imported data that does not have the identity IDs and start over.