Running the Time Sheet Data Importer Script

Note: Careful preparation of the data in the .xml file is essential to a successful import process. Reworking invalid data and rerunning the script is time consuming, especially for larger volumes of data. Make sure that prerequisites are met and that appropriate time and resources will be available when preparing to run the script and when running it.

To run the script to import time sheet data from the .xml file into the PPM database:

  1. On the PPM Server, navigate to the directory that contains the kTMDataConversion.sh script, as follows:

    cd <PPM_Home>/bin

    where <PPM_Home> represents the path where your PPM instance is installed. For example: xyzserver/E/PPMServer.

  2. Run the following script, adding optional arguments as needed:

    sh ./kTMDataConversion.sh -user <username> -pwd <password>    -xmlLocation <XML location>

    For example, run the following script in test mode against the source file named Source.xml in the C:/Timesheet_Data directory:

    sh ./kTMDataConversion.sh -user <username> -pwd <password>    -xmlLocation C:/Timesheet_Data/Source.xml -testMode

    The following table describes the arguments.

    Argument (*Required)

    Description

    * -user

    Any existing PPM user who has the Edit Time Sheets access grant.

    * -pwd

    Password of the PPM user.

    * -xmlLocation

    Directory where the .xml files to be used by the script are located. Add the file name if only one file among others in the directory is to be used. The directory must contain only .xml files that can be used by the script.

    -logLocation

    Directory where the logs generated by the script are to be saved. The default is the directory where the .xml files are located. For information about the logs, see Files Generated While Running the Time Sheet Data Importer.

    -maxThreadcount

    Number of simultaneous threads the script can use to process data and create time sheets.

    The default is 10.

    For considerations in specifying the value of this argument, see Configuring PPM Environments. We recommend using no more than 15 threads.

    -checkPolicyAndDefaultCC

    Specifies whether the script will determine which time sheets that are in Unsubmitted, Pending Approval, or In Rework status violate any of their time sheet policies specified in the .xml file. For example, the user could have reported working more hours than the policy allows or fewer than it requires. In setting this argument to true or false, consider whether the specified time sheet policy should be applied now to time that users previously logged in the external application.

    A time sheet policy violation does not cause the script to log an error, and the script creates a time sheet in PPM, but the violations appear as usual when the time sheet is opened.

    For information about time sheet policies and violations, see Time sheet policies and the Time Management User Guide.

    If a time sheet line in the .xml file has a charge code specified, that charge code is imported to that line. If this argument is set to true and the .xml file does not specify a charge code, the charge code for the imported line is set according to the default charge code and override rules of the resource's time sheet policy in PPM.

    The default for this argument is false.

    -errorsPerMinuteForCancel

    Number of errors you allow per minute, for errors that prevent importing a time sheet. If exceeded, the script automatically stops running. (Some of the time sheets in a file might not be imported, but any one time sheet will be completely imported or not imported at all.)

    The default is 50.

    -testMode

    If set to true, runs the script and logs errors for you to review, but does not create any time sheets.

    If set to false, runs the script, logs errors, and imports data as new time sheets in PPM.

    The default is false.

    -languageCode

    Code for the language in which the .xml files must specify the following entities:

    • activityName for activities

    • chargecodeName for charge codes

    • workItemDescription if workItemType is MISC, for the descriptions of miscellaneous (MISC) work items.

    For example, the value of this field is de for German or ko for Korean.

    The default is the system language of the PPM Server.

    This field is provided for users who need to specify these entities in .xml files in a language other than the system language, such as a different session language the user selects when logging in to PPM.

    If any of these entities is not coded in an .xml file in the language specified by this field, the script cannot find the entity.

    For information about the use of multiple languages in a PPM instance, see the Multilingual User Interface Guide.