You are here: Chapter 7: Configuration and Administration > System Administration > Workspace Management > Creating the Data File for Issue Import

Creating the Data File for Issue Import

To import data into a FootPrints Workspace, the data must be contained in a Comma-separated-Variable (CSV) format file.

CSV File

  1. The fields in each record must be separated by a comma (‘,’).
  2. Each record must end with the system new line separator (i.e., the result of pressing “Enter”, “Return”, “^M”, etc.)
  3. Fields that span more than one line or that have internal commas must be enclosed inside a pair of double-quote (" ") characters.  Any field can optionally be inside a pair of double quotes.  For example:

“This field, the third, includes two commas.”

  1. Only fields defined in FootPrints as multi-Line text fields are permitted to span more than line.  For example, the Assignee field is not permitted to occupy more than one line.

The following are examples of CSV-formatted data:

this is the title,this is the description,1,Open,jsmith,Printer

this is the title,”this includes, a comma”,1,Open,jsmith,Printer

”more title”,”This description is on
multiple lines”,1,Open,jsmith,Printer

Other Features

System down,Please reboot machine.,1,Open,jsmith,,network

Notice the two commas between jsmith (the Assignee) and network (the Problem Type). These represent the Platform field, for which there is no data in the record.

Mandatory fields must contain data.  Mandatory fields are indicated in red in the Schema.

For example, if the load file is created in Microsoft Excel, the final CSV file created by Excel does not provide comma characters for null fields at the end of the data line. For this case, there is an option to skip the Field Count Test. If you select this option, you can submit a load file without the trailing commas normally required for optional, empty fields. By skipping this test, there is a risk that your data may not be loaded properly, so please be careful in preparing your data.

Note

The choice to skip the Field Count Test is not available when the Link records to be loaded to this workspace's Address Book option is selected because the Address Book key is always the last field in the file, so all fields must be accounted for.

Here is an example of an acceptable record if the Field Count Test is skipped, using the Schema above, but assuming the Problem type field is optional:

System down,Please reboot machine.,1,Open,jsmith

Notice that the trailing commas for the two final, optional fields (Platform and Problem Type) are missing.  When a CSV file is created by Excel, commas are never included for empty trailing columns, which are normally required by FootPrints.  By skipping the Field Count Test, a CSV file created from Excel can be used without editing it to add the trailing commas.

[jsmith]System down=Please reboot machine.=1=Open=jsmith=
[jjones]printer broken=Printer #5 is broken=1=Open=joe=

Note

To assign all the Issues in the text file to the same user(s), the IDs can be entered in a single place on the Administration | System | Workspaces page in the Load External Data into a FootPrints Workspace Database section.  If one or more assignee names are provided on the System Administration page, any names found in the load file are ignored. A few more notes regarding Assignees:

this is the title,"this includes, a comma",1,Open,"Hardware,fhp,scp,jsmith",Printer

To submit an issue with no assignee, leave the assignee field empty:

this is the title,"this includes, a comma",1,Open,,Printer

Multiple Blank Spaces

By default, when a data file is imported, multiple blank spaces are ignored and only a single blank space is imported.  For example, if a record in your data were as follows:

title,description,1,Open,joe     smith

It would be imported as this:

title,description,1,Open,joe smith

In other words, "Joe    Smith" becomes "Joe Smith".

To import the blanks exactly as they appear, without compressing multiple blank spaces, set the $ReplaceBlanks variable in MRlocaldefs to "1".  If you do so, imported multi-line data is imported exactly as it is in the load file.