DataImporter - Import Activities in Tasks



This  import type is used to import activities into SRs, changes and problems.


This type of import involves risk, especially if Octopus is already in production in your environment.

It should be done by a person seasoned in the knowledge of DataImporter.

IMPORTANT; If you are importing activities into change tasks from a source system, all import types must absolutely be done at once with the same XML file. Otherwise, the Octopus request number must be referenced instead of the source system number. For more information, see the DataImporter - Import Changes article.  

We also recommend that you contact us before importing to ask for a temporary test database to minimize the risk of problems with the import and to obtain assistance and advice as needed.  

Because importing changes does not allow to update, any error must be corrected manually.


What you need to know:  

The reference template files (.xlsx and .xml) to prepare imports are included in the file.

ATTENTION; The zip file above contains the files to import SR and problem tasks, to import change task activities, it is better to use the zip files of the page DataImporter - Import Changes.

Required Fields

  • ParentNumber - Whole Number
    • Represents the number of the SR, change or problem. 
    • The number used must be the one from Octopus to add the task to an existing SR, change or problem. 
    • Importing tasks to changes can be done with a source system, but this method requires that all the elements be imported in a single step. For more information, see the DataImporter - Import Changes article. 
  • Number - Whole Number
    • Represents the number of the task associated with the activity. 
    • The numbers must be sequential and start with 1. 
  • ParentType
    • Represents the request parent type of the task. 
    • Accepted values are: Incident/SR, Change, Problem.
  • Date – Date and Time
    • Represents the activity date. 
    • The date format must be compatible with the server settings; YYYY-MM-DD.
  • User
    • Assignee who made the activity.
    • The Octopus user must already exist in Octopus. 
    • The only method to identify the Octopus user is the Windows username. 
    • If the activity was done by an end user, the UserRoleSource field will be required

Optional Fields

  • Type
    • Represents the activity type already defined in Octopus.
    • The activity type is configurable from the Tools > Reference data management > General > Activity types menu.
    • If this field is mandatory in Octopus, it will be mandatory during import. 
  • WorkBreakdown - Text(5000)
    • Represents the description of the work done
    • If this field is mandatory in Octopus, it will be mandatory during import
What you need to know
  • Multiple activities can be added at a time by placing them on separate lines.
  • Each new line with the same request number will be a new activity.
  • Effort
    • Represents the effort of the work done for each activity.
    • Format HH:MM:SS (in Excel the column must be in text format).
    • The activity effort must be between 00:01 and 99:59
    • For example, for one and a half hour, write 01:30 in the column.
    • A day value is converted into hours. For example, 1 = 24 hours, so 24:00.
    • When the minutes exceed 59, they are converted into hours. For example, 0:75 = 1:15.
    • If there are seconds added, they are ignored. For example, 1:10:25 = 1:10.
    • This field is required if it is mandatory in the Octopus options.
  • OnSiteVisit - Boolean
    • Check box type field to specify if the technician had to go on site to execute the activity.
    • Accepted values are: 1 or 0, True or False, Yes or No.
    • If non-specified, the default value is no.
  • Supplier - Text(100)
    • To add an External labour activity. 
    • Indicates the name of the supplier who did the work. 
    • If Octopus finds the name of the supplier, it will associate the activity with the supplier found. 
    • Otherwise, it will create a new supplier. 
  • Cost - Decimal
    • The value must be between 0 and 9 999 999.99.

    • Example: 1234567.89.

  • Group

    • Represents the group to which the activity will be associated and must be a valid group name.

    • Used to identify the Octopus user's group when he is part of more than one group.

  • IsVisibleOnWebPortal
    • Used to determine if the activity will be visible by the user on the Web Portal. 
  • UserRoleSource
    • To add an activity done by an end user.
    • Indicate the value: End-User
    • The Windows username of the user that did the activity will need to be in the User field. 

Content of the Configuration File (TasksActivities.xml)

The declaration of the source is done by indicating the TaskActivity value in the  <Content> tag.

NOTE: The XML file used as this example is for an import done from Excel 2007 or 2010.
<?xml version="1.0" encoding="utf-8" ?> 
     <Source Name="ImportTaskActivities">

<ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Import\Taches.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";</ConnectionString>
     <ViewName>[Tasks Activities$]</ViewName> 

Refer to the XML Configuration File article that explains how to program references to the data sources.


Help us improve our articles

Help us improve our articles