DataImporter - Import Tasks

SHOW ALL CONTENT

Introduction

This type of import allows you to import tasks into SRs, Changes and Problems.


                                                      WARNING

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 changes and activities into 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.

The only type of task that can be imported is the Standard type.

References

What you need to know:  

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


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

Recommendation

Although it's possible to create tasks in batch with this type of import. It's a tedious job that takes a lot of preparation time, testing, and so on.

Before proceeding, it is recommended to take the time to validate whether the import of tasks is an added value or whether it would be possible to simply import the activities related to the tasks directly into the queries to keep the history.

Required Fields

  • Number - Whole Number
    • Represents the number of the task to create.
    • The numbers must be sequential and start with 1. 
  • 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. 
  • ParentType
    • Represents the request parent type of the task. 
    • Accepted values are: Incident/SR, Change, Problem.
  • TaskType
    • Represents the task type. 
    • Only standard tasks can be imported.  
  • RawSubject - Text
    • Represents the subject of the task. 
    • As with task templates, the subject can contain one or more variables that will be interpreted when the task is created. 
    • Example: Prepare laptop for
  • Status
    • Represents the status of the task.
    • Accepted values are: Not started, In progress, Completed, Cancelled.
  • Group
    • Represents the group of the task and must be a valid group name.

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

 

Optional Fields

  • ShortSubject - Text
    • Represents the subject of a task that is not active. 
    • Example: Prepare laptop for the user.

  • Description - Text
    • Represents the description of the task. 
  • Assignee - Text
    • The task assignee. 
    • The Octopus user must already exist in Octopus. 
    • See the Assignee Identification Method section to indicate how the Octopus user will be recognized. 
  • Active - Boolean
    • Indicates if the task must be active or not. 

    • Accepted values are: 1 or 0, True or False, Yes or No.

    • By default, if the field is not specified it will be active. 

    • Do not activate if the task has dependencies. 

  • EstimatedEffort
    • Indicates the estimated effort needed to complete the task.
    • The effort must be between 00:01 and 9999: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.
  • Dependencies - Whole Number
    • Indicates if one or more other tasks are a prerequisite to this one.
    • The task 1 cannot have dependencies. 
    • A task with a dependency cannot be active. 
    • Example : 1, 2, 5
  • DueDateMode
    • Indicates the due date mode. 
    • Accepted values are: Fixed or Activation based
    • The DueAfterValue and DueAfterUnit will be required with the Activation based value. 
  • DueAfterValue - Whole Number
    • To use in combination with the Activation based DueDateMode.
    • Is the number of units that will determine the due date of the task upon activation. 
    • Example : 3
  • DueAfterUnit
    • To use in combination with the Activation based DueDateMode.
    • Is the type of unit that will determine the due date of the task upon activation. 

    • Accepted values are: Minute, Hour, Day, Week. 

  • DueDate – Date and Time
    • To use in combination with the Fixed DueDateMode.

    • Represents the due date of the task. 

    • The date format must be compatible with the Octopus server settings, YYYY-MM-DD.

    • The date may be in the past or the future, if it has already passed and the task is not completed, the task will show that it is late.

  • IsVisibleOnWebPortal - Boolean
    • Indicates if the task will be visible to the requester and user on the Web Portal. 
    • Accepted values are: 1 or 0, True or False, Yes or No
    • By default, if the field is not specified the task will not be visible. 

  • CancelDependantTasksOnCancellation - Boolean
    • Indicates if the subsequent tasks will be cancelled if this one is. 

    • Accepted values are: 1 or 0, True or False, Yes or No

    • By default, if the field is not specified the option will be unchecked.

  • CompletedBy
    • Indicates the Octopuser user who completed the task. 
    • The Octopus user must already exist in Octopus. 
    • See the Assignee Identification Method section to indicate how the Octopus user will be recognized. 

  • OnHold  - Boolean
    • To use in combination with the OnHoldReason field. 
    • Indicates if the task is on hold. 
    • Accepted values are: 1 or 0, True or False, Yes or No
    • By default, if the field is not specified the option will be unchecked.
  • OnHoldReason - Text
    • To use in combination with the OnHold field. 
    • Indicates the reason why the task is on hold. 
  • EstimatedRemainingEffort
    • Indicates the time of the Remaining effort field.
    • The effort must be between 00:01 and 9999: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.​
  • EstimatedStartDate - Date and Time
    • Indicates the estimated start date of the task. 
    • The date format must be compatible with the Octopus server settings, YYYY-MM-DD.
  • EstimatedEndDate - Date and Time
    • Indicates the estimated end date of the task. 

    • The date format must be compatible with the Octopus server settings, YYYY-MM-DD.

  • ActualStartDate - Date and Time
    • Indicates the actual start date of the task. 

    • The date format must be compatible with the Octopus server settings, YYYY-MM-DD.

  • ActualEndDate - Date and Time
    • Indicates the actual end date of the task. 

    • The date format must be compatible with the Octopus server settings, YYYY-MM-DD.

Content of the Configuration File (Tasks.xml)

The declaration of the source is done by indicating the Task 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" ?> 
<Sources> 
     <Source Name="ImportTasks">

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

 
<!-- Additional tag -->
<AssigneeIdentificationMethod>UserByWindowsUsername</AssigneeIdentificationMethod>
</Source> 
</Sources>

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

Additional Tags to Import Tasks

In the XML file to import tasks in SRs, changes and problems it is possible to specify how the import will behave. This tag is not mandatory and when it is not specified, the default value will be used. 

What you need to know

The additional tags are case sensitive.

If the value is not written exactly the way it is documented, Octopus will ignore the tag and use to the default value. 

Assignee Identification Method

In the XML file to import tasks, it is possible to specify how the assignee will be found. If this tag is not specified, the default value will be the Windows Username.

Permitted values for the AssigneeIdentificationMethod tag:

  • UserByID: Octopus user employee number

  • UserByName: First and last name of the Octopus user (in the following format John Smith)

  • UserByWindowsUsername ((Default value): Windows username of the Octopus user

To use this tag, add the following line to the XML file:

<AssigneeIdentificationMethod>Value</AssigneeIdentificationMethod>
X
Help us improve our articles








Help us improve our articles