Task Estimates

All activeCollab tasks can have an estimate set. This is a number of hours that teams expects to spend on a task in order to complete it. To set an estimate for a task, you need to set job_type_id and estimate values. Lets see which job types we have defined:

Response: HTTP 200, application/json (Hide)
GET /job-types

Response:

1
2
3
4
5
6
7
8
9
10
11
12
[
    {
        "id": 1,
        "class": "JobType",
        "url_path": "\/job-types\/1",
        "name": "General",
        "is_archived": false,
        "updated_on": null,
        "is_default": true,
        "default_hourly_rate": 100
    }
]

Ok, we have one job type and it's name is "General". Lets create a task that we expect will take 8 and a half hours of work:

Response: HTTP 200, application/json (Hide)
POST /projects/1/tasks

Payload:

1
2
3
4
5
{
    "name": "Task #1",
    "job_type_id": 1,
    "estimate": "8:30"
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
    "single": {
        "id": 1,
        "class": "Task",
        "url_path": "\/projects\/1\/tasks\/1",
        "name": "Task #1",
        "assignee_id": 0,
        "delegated_by_id": 0,
        "completed_on": null,
        "completed_by_id": null,
        "is_completed": false,
        "comments_count": 0,
        "attachments": [],
        "labels": [],
        "is_trashed": false,
        "trashed_on": null,
        "trashed_by_id": 0,
        "project_id": 1,
        "is_hidden_from_clients": false,
        "body": "",
        "body_formatted": "",
        "created_on": 1430164367,
        "created_by_id": 1,
        "updated_on": 1430164367,
        "updated_by_id": 1,
        "task_number": 1,
        "task_list_id": 0,
        "position": 1,
        "is_important": false,
        "due_on": null,
        "estimate": 8.5,
        "job_type_id": 1,
        "total_subtasks": 0,
        "completed_subtasks": 0,
        "open_subtasks": 0
    },
    "subscribers": [
        1
    ],
    "comments": [],
    "reminders": [],
    "subtasks": [],
    "task_list": null,
    "tracked_time": 0,
    "tracked_expenses": 0
}

Estimate value can be provided in decimal format (8.5) or in HH:MM format (8:30). activeCollab will detect the format and do the conversion in the background. Now lets remove the estimate:

Response: HTTP 200, application/json (Hide)
PUT /projects/1/tasks/1

Payload:

1
2
3
4
{
    "job_type_id": 0,
    "estimate": 0
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
    "single": {
        "id": 1,
        "class": "Task",
        "url_path": "\/projects\/1\/tasks\/1",
        "name": "Task #1",
        "assignee_id": 0,
        "delegated_by_id": 0,
        "completed_on": null,
        "completed_by_id": null,
        "is_completed": false,
        "comments_count": 0,
        "attachments": [],
        "labels": [],
        "is_trashed": false,
        "trashed_on": null,
        "trashed_by_id": 0,
        "project_id": 1,
        "is_hidden_from_clients": false,
        "body": "",
        "body_formatted": "",
        "created_on": 1430164367,
        "created_by_id": 1,
        "updated_on": 1430164367,
        "updated_by_id": 1,
        "task_number": 1,
        "task_list_id": 0,
        "position": 1,
        "is_important": false,
        "due_on": null,
        "estimate": 0,
        "job_type_id": 0,
        "total_subtasks": 0,
        "completed_subtasks": 0,
        "open_subtasks": 0
    },
    "subscribers": [
        1
    ],
    "comments": [],
    "reminders": [],
    "subtasks": [],
    "task_list": null,
    "tracked_time": 0,
    "tracked_expenses": 0
}

Changes to job type and estimate fields should be correctly recorded in task history:

Response: HTTP 200, application/json (Hide)
GET /history/task/1

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[
    {
        "timestamp": 1430164367,
        "created_by_id": 1,
        "created_by_name": "ilija.studen",
        "created_by_email": "ilija.studen@activecollab.com",
        "modifications": {
            "estimate": [
                8.5,
                0
            ],
            "job_type_id": [
                1,
                0
            ]
        }
    }
]