Create Tasks

Function name

create-tasks

HTTP Parameters

data (Required). It is an array of task fields. The details of the fields are as follows:

project_id (Required). Integer. ID of the project
summary (Required). Name of the task.
is_manual (Optional). True or False. Indicates if the task is manually scheduled. If unspecified, will create the task as per project option.
plan_start (Required if the task is manually scheduled) Date. The planned start date if the task is manually scheduled.
plan_finish (Required if the task is manually scheduled). Date. The planned finish date if the task is manually scheduled.
constraint_type (Required if the task is auto-scheduled). Date. One of the following: ASAP, MSO, MFO, SNET, SNLT, FNET, FNLT, ALAP.
constraint_date (Required). Date of the above constraint to be set.
duration (Optional). Can be specified in days, hours, weeks, etc. (10d, 5h, 2w). Cannot be entered if the task is manually scheduled.
work (Optional). Efforts on the task specified in hours. Cannot be entered if the task is manually scheduled.
parent_id (Optional). Integer. ID of the parent task. 
predecessors (Optional) Primary Key of the predecessor task; not the ID.

assignments (Optional). A string in the form user-id-1[<allocation-1],user-id-2[<allocation-2], etc. E.g. 10001[20%],Mary Jane[40h].

default_schedule_type (Optional). String. Applicable to auto-scheduled tasks. One of the following: FIXED_WORK, FIXED_DURATION or FIXED_UNITS.  If unspecified, will create the task as per the project's "Default Task Schedule Type" option.

schedule_type_override (Optional). String. Applicable only while modifying auto-scheduled tasks. One of the following: FIXED_WORK, FIXED_DURATION or FIXED_UNITS. In the case of auto scheduled tasks, W = D x U always holds true. So if D is changed, the system changes W or U to keep the equation consistent. The choice of whether to change W or U is dependent on the schedule type of the task. If it is "Fixed Work", then U (assignment units) is changed and if it is "Fixed Units", then W is changed. But what if the schedule type is "Fixed Duration"? Now the system doesn't know whether to change U or W. This parameter answers this question for the system. Let's assume that D is changed and the task's schedule type is "Fixed Duration". If this parameter is specified as FIXED_WORK, then U is changed and if specified as FIXED_UNITS, then W is changed. This value is not saved.

priority (Optional). Value between 1 (Very High) and 5 (Very Low).
detail (Optional). A detailed description for this task.
can_fill_time (Optional). Boolean. Whether time can be filled against this task.
budget (Optional). Number. The budget for this task.
est_non_labor_cost (Optional). Number. The estimated non-labor cost (a.k.a material cost) for this task.
fixed_cost (Optional). Number. The fixed cost for this task.
formula_key (Optional). The custom field attached to the task. You need to use the formula key of the custom field.

Return values:

tasks_id


When your data format is XML, you should post the data parameter something like this

<data>
    <item> <!--create tasks-->
      <project_id>100</project_id>
      <summary>Task #1</summary>
      <detail>This is the task description</detail>
      <is_manual>true</is_manual>
      <plan_start>2010-11-02T08:00:00</plan_start>
      <plan_finish>2010-11-04T17:00:00</plan_finish>
      <parent_id>12345</parent_id>
      <predecessors>121121SS,454322FF</predecessors>
      <priority>2</priority>      
      <assignments>10001[20%],100010[50%]</assignments>
      <c459099>500</c459099> <!--Formula key of the custom field>
    </item>
    <item>
      <project_id>100</project_id>
      <is_manual>false</is_manual>
      <constraint_type>MSO</constraint_type>
      <constraint_date>2010-11-04T17:00:00</constraint_date>
      <duration>10d</duration>
      <summary>Task #2</summary>
      <detail>This is the task description</detail>
      <assignments>10001[50h]</assignments>
     </item>
</data>


In the case of JSON, you should submit an array of objects with the same properties as the data parameter.

[
  {
    
    "project_id" : "100",
    "summary" : "Task #1",
    "detail" : "This is the task description",
    "parent_id" : "12345",
    "predecessors" : "123121",
    "priority: : "2",
    "plan_start" : "2010-11-02T08:00:00",
    "plan_finish" : "2010-11-04T17:00:00",
    "assignments" : "10001[20%]",
    "c459099" : "500"
  }
]

Related pages