Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Function name

create-tasks

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.
priority (Optional). Value between 1 (Very High) and 5 (Very Low).
detail (Optional). A detailed description for this task.
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].
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 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_type>
      <duration>10d</duration>
      <summary>Task #2</summary>
      <detail>This is the task description</detail>
      <assignments>10001[50h]</assignments>
     </item>
</data>


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

[
  {
    
    "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"
  }
]
  • No labels