Import Project Data Dialog

Code Insight 2021 R2

The Import Project Data dialog is displayed when you select the Import Project Data option from the Manage Project dropdown menu on the Summary tab for a project. This dialog enables you to import data from another Code Insight project or source into the current Code Insight project (called the target project) from which you are invoking the import. The project data to be imported must be in a properly formatted and archived JSON file, called the import data file (such as the output of a Code Insight project data export).

Complete details on import process—how to prepare for it, how to run the import, and what results to expect— are provided in the Exporting and Importing Project Data chapter.

An additional setting, not shown on the Import Project Data dialog but used during the import process, is defined at the project level. The setting (On data import or scan, delete inventory...) determines whether the import should create “empty” inventory on the target—that is, inventory in the import data file that either has no associated files or has associated files that have no match in the target project codebase. For a description of this setting and how to change its value, if necessary, before running the import, see Edit Project: General Tab.

The following table describes the import options available on the Import Project Data dialog.

Import Project Data Dialog

Column/Field

 

Description

Choose File to Import

Click Browse next to the Choose File to Import field to search for and select the .zip file containing the JSON project data you are importing.

Add Files to Inventory

Select Yes to enable the import to create new file associations with target inventory. The File Matching Criteria field is displayed (if it is not already).

Select No to disable the creation of any new file associations with target inventory during the import process.

File Matching Criteria

Select the option that identifies the criteria (file path, file MD5, or both) used to determine whether a file associated with an inventory item in the import data file has a match in the target project codebase. Only those files in the import data file that have matches in the target project codebase can be associated with target inventory.

For a description of the criteria options, see About the File-Matching Criteria for the Import.

...to n directories above the file

If you have selected Check only the file partial path or Check the file MD5 and the partial path in the File Matching Criteria field, provide the directory depth that defines the partial path. That is, specify the number of directories above the file name that must be the same before two paths are considered as matches.

For example, a value of 2 indicates that file paths must match 2 directories above the file name. Suppose a file in the import data file has the path /ePortal-1.3/copy1/src/gettext.c and a file in the target codebase has the path /ePortal-2.0/copy1/src/gettext.c. With a directory depth of 2, only /copy1/src/gettext.c needs to match in the two file paths to meet the partial-file criterion.

You can enter a directory-depth value between 1 and 20, inclusively.

For more information, see About the File-Matching Criteria for the Import.

Mark Files as Reviewed

Select Yes to enable the import to flag files with the “Reviewed” status in the target project codebase if they do not already have this status. The File Matching Criteria field is displayed (if it is not already).

Select No to disable the import’s ability to mark files as reviewed during the import process.

Note:For this option, the import compares only those files in the import data file that are marked as reviewed with files in the target codebase.

File Matching Criteria

Select the option that identifies the criteria (file path, file MD5, or both) used to determine whether a file in the import data file has a match in the target project codebase. Only those files in the import data file that have matches in the target project codebase can be marked as reviewed.

For a description of the criteria options, see About the File-Matching Criteria for the Import.

...to n directories above the file

If you have selected Check only the file partial path or Check the file MD5 and the partial path in the File Matching Criteria field, provide the directory depth that defines the partial path. That is, specify the number of directories above the file name that must be the same before two paths are considered as matches.

For example, a value of 2 indicates that file paths must match 2 directories above the file name. Suppose a file in the import data file has the path /ePortal-1.3/copy1/src/gettext.c and a file in the target codebase has the path /ePortal-2.0/copy1/src/gettext.c. With a directory depth of 2, only /copy1/src/gettext.c needs to match in the two file paths to meet the partial-file criterion.

You can enter a directory-depth value between 1 and 20, inclusively.

For more information, see About the File-Matching Criteria for the Import.

Inventory Notes Handling

Select the appropriate option to determine how the import process handles content in the notes fields between identical inventory items in the import data file and the target project. The inventory notes fields to which this option applies include the following:

Notices Text 
Audit Notes 
Usage Guidance 
Remediation Notes 

Note:Inventory items are considered identical if they are associated with the same component-version-license combination, called CVL, as stored in the Code Insight data library.

Overwrite existing notes with imported notes

(Default) Select this option to overwrite the notes fields in the target inventory item with content from the identical inventory item in the import data file. However, if a given notes field is blank in the import data file, any existing content for that same field in the target inventory is retained.

Append imported notes to existing notes

Select this option to append data from the notes fields for a given inventory item in the import data file to those same fields in the identical target inventory item. When content is appended in a given notes field in the target inventory item, it is separated from the existing content with a line break and this heading:

Copied during import from <ProjectName>:<InventoryName> (TimeStamp) 

However, if the content in a given notes field is the same for the inventory item in both the import data file and the target inventory, no content is appended in this field in the target inventory item.

OK

Click to start the import process.