evimport

This command enables the user to import a tab-delimited file from which records can be parsed and added to the database.

SYNOPSIS

evimport [-c] [-n] [-a attachment_dir -o field_name] file.txt

evimport -u file.txt

evimport -ui file.txt

evimport -n file.txt

NOTES

  • The issues will be added to the business area and project set by the evproj command
  • Only fields on the ADD_PROBLEM layout for the nominated business area and project can be included within the import, and the user must have write permissions to these fields
  • Reads in a text file composed of tab delimited fields. Saving a spreadsheet in a tab-delimited format typically composes this file
  • The first (non-blank non-comment) line contains titles for database items that must match exactly what is returned from evaddlist. This line specifies which column should be inserted into which database field inside ExtraView
  • The rest of the tab-separated rows in the file are read and an issue record is created within ExtraView for each row. If a line contains only __END__ all lines after it are ignored. This allows for storing titles and other values without affecting the running of the command.
  • If a title in the first line begins with an asterisk (*), that column is skipped entirely. This is useful in case the original file has additional columns of data irrelevant to the import
  • If a line contains only the text __END__, then this line and all following lines will be ignored
  • Blank lines and those beginning with a hash mark (#) are ignored
  • If one or more records cannot be imported because of data errors, they are written to a file named errors.txt. This file may be edited, renamed and used again with the evimport program. Note that the same filename is used for each set of errors, so be sure to rename this before running the command again
  • The -n option suppresses the sending of email to users as each issue is entered into the database
  • When the -c option is used, the file is processed, without updating ExtraView. This is good for error verification before actually doing the inserts. Typical errors are values that are not valid for an unknown release or category
  • The -u option presents a list of titles to the user and asks which ones you wish to find unique fields for. Then the file is parsed in its entirety. The parser will search for uniquely occurring values within the requested fields. This is useful for preparing ExtraView metadata before doing the actual evimport
  • The -ui option is similar to the -u option, except that after showing the set of unique values, the program asks if the invalid ones (marked with an asterisk) should be inserted into ExtraView as valid values for this field. After saying y to all of these questions evimport -c should succeed
  • If the data being imported contains text fields with multiple lines, the end of line character(s) within the import file must be changed before the import is commenced. If this is not done, the end of the first line is interpreted as the end of the record. To overcome this, change the end of line character(s) within the text fields to <<EV_DELIM_EOL>>. The evimport command will alter the data as it is being imported to reinstate the new lines within the data. The <<EV_DELIM_EOL>> value can be altered with an assignment, to be a different character string like so:

    EOL = **

  • If the data being imported contains tab characters they can be handled in a similar fashion to the EOL character. If a field value contains <<EV_DELIM_TAB>>, this string or an equivalent value will be translated into a tab character as the import is performed. To replace the <<EV_DELIM_TAB>> value, use:

    TAB = REPLACE_ME_WITH_A_TAB

  • The -a option is always used with the -o option. Should these be present, they indicate that attachments will be uploaded with the issues in file.txt. The attachment_dir is the name of the directory where the attachments are stored. Within this directory, there will be sub-directories whose name is derived from the value of the import field, field_name. For example, if the attachment_dir is /mydir/attachments, and the import field is this_field then the attachment files for the issue will be found under the directory named /mydir/attachments/this_field