2.6. Create-task-updates

Creates status updates on tasks and also submits time entries for those tasks.

Function name

create-task-updates

Parameters
  • data (Required). It is an array of fields. For example, in case the data format is XML, you should post something like this:

    <data>
        <item> <!-- update task status and fill time -->
            <creator_id>100</creator_id>
            <date>2008-10-01</date>
            <task_id>12345</task_id>
            <percent_complete>50</percent_complete>
            <actual_start>2008-09-02T08:00:00</actual_start>
            <comments>Am half way there</comments>
            <hours_worked>2.5</hours_worked>
            <time_code_id>12</time_code_id>
            <rate_type_id>1</rate_type_id>
            <send-for-approval>false</send-for-approval>
        </item>
        <item> <!-- the following just fills an update -->
            <creator_id>100</creator_id>
            <date>2008-10-01</date>
            <task_id>18381</task_id>
            <percent_complete>100</percent_complete>
            <actual_finish>2008-09-02T17:00:00</actual_start>
            <comments>Done!</comments>
        </item>
    </data>

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

    Here are the details of the fields:

    • creator_id (Required). Integer. The user on behalf of which the time entry is being submitted.

    • date (Required). Date. The date for this update. The same date is used for the time entry.

    • task_id (Required). Integer. The task for which this time entry is being filled.

    • percent_complete (Optional). Integer between 0 and 100. The percent complete for this task.

    • actual_start (Optional). Date. The date this task started being worked on.

    • actual_finish (Optional). Date. The date this task was finished. Valid only when percent complete is 100.

    • comments (Optional). The comments for this task update. The same will be used while filling time.

    • hours_worked (Optional). Float. The number of hours. If not present, only task status is updated and no time entry is added.

    • time_code_id (Optional, Required if hours_worked parameter is submitted). Integer. The time code ID for this time entry.

    • rate_type_id (Optional). Integer. 1 for standard, 2 for overtime (in case your organization uses overtime rates), defaults to 1.

    • send_for_approval (Optional). Boolean. Whether this time entry is to be sent for approval. If false, this will be saved.

Return values

Nothing