Tasks Suggest
Personas in this Story: Default, Member, Client.
Response: HTTP 200, application/json (Hide)
POST /projects/1/tasks
Payload:
1 2 3
{ "name": "Visible task in client project" }
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": "Visible task in client project", "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": 1430164407, "created_by_id": 1, "updated_on": 1430164407, "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 }
Response: HTTP 200, application/json (Hide)
POST /projects/1/tasks
Payload:
1 2 3 4
{ "name": "Hidden task", "is_hidden_from_clients": true }
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": 2, "class": "Task", "url_path": "\/projects\/1\/tasks\/2", "name": "Hidden task", "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": true, "body": "", "body_formatted": "", "created_on": 1430164407, "created_by_id": 1, "updated_on": 1430164407, "updated_by_id": 1, "task_number": 2, "task_list_id": 0, "position": 2, "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 }
Response: HTTP 200, application/json (Hide)
POST /projects/2/tasks
Payload:
1 2 3
{ "name": "Visible task in internal project" }
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": 3, "class": "Task", "url_path": "\/projects\/2\/tasks\/3", "name": "Visible task in internal project", "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": 2, "is_hidden_from_clients": false, "body": "", "body_formatted": "", "created_on": 1430164407, "created_by_id": 1, "updated_on": 1430164407, "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 }
Owner can see both #1 tasks:
Response: HTTP 500, text/html
GET /search/suggest
Query Parameters:
1 2 3
{ "q": "#1" }
Member can see only task in a project that he is involved with:
Response: HTTP 500, text/html
GET /search/suggest (as Member)
Query Parameters:
1 2 3
{ "q": "#1" }
So does client:
Response: HTTP 500, text/html
GET /search/suggest (as Client)
Query Parameters:
1 2 3
{ "q": "#1" }
Owner can see task #2:
Response: HTTP 500, text/html
GET /search/suggest
Query Parameters:
1 2 3
{ "q": "#2" }
Member can see it as well:
Response: HTTP 500, text/html
GET /search/suggest (as Member)
Query Parameters:
1 2 3
{ "q": "#2" }
But client can't:
Response: HTTP 200, application/json (Hide)
GET /search/suggest (as Client)
Query Parameters:
1 2 3
{ "q": "#2" }
Response:
1
null