TaskAssignments
Introduction
TaskAssignments
describe when a task should be executed by users or user groups.
The information passed for TaskAssignments
and related TaskTemplates will be used to create Tasks for each user and group automatically.
Model Definition
Alias
taskAssignment
Relations
Relation | Key | Type | Relation Field(s) |
---|---|---|---|
| Belongs to |
| |
| Belongs to many | Intermediate table | |
| Belongs to many | Intermediate table | |
| Belongs to |
| |
| Has many |
|
Traits
Sortable
List
To get a list of TaskAssignments, create a GET request to:
/api/tasks-2/task-assignments/
.
Show
To show a TaskAssignment, create a GET request to:
/api/tasks-2/task-assignments/{id}
.
Create
To create a new TaskAssignment, create a POST request to:
/api/tasks-2/task-assignments/
.
Request Keys
Key | Type | Default | Description |
---|---|---|---|
| string | - | The title of the assignment |
| string | - | The description of the assignment |
| integer | - | The id of the related TaskTemplate |
| integer | - | UserID of the creator |
| string | - | How to assign tasks to given departments/users |
| date | - | On which date this assignment starts |
| date | - | At which time this assignment starts. |
| interval | - | When to show the tasks of this assignment. |
| boolean | - | Indicates if this assignment is active. |
| rrule | - | How to repeat tasks from this assignment |
| date | - | When to stop repeating tasks from this assignment |
| integer | - | The sort number of this template. |
| array | - | Departments that should get tasks from this assignment |
| array | - | Users that should get tasks from this assignment |
Keys with *
are required.
Advanced Key-Specifications
description
- Has to be wrapped by a<p>
-Tagtask_template_id
- Has to be an existing TaskTemplate idcreator_user_id
- Has to be an existing user id. Will be set to current user if empty.assign_mode
- Has to be one of the following identifiers:one_of
any_of
one_of_user
any_of_user
start_date
- Format YYYY-MM-DDstart_time
- Format H:i:svisibility_start
- ISO 8601 DateInterval duration (example: P1M)active
- Will be set totrue
if emptyinterval
- iCalendar RFC5545 recurring rule (example: FREQ=DAILY;UNTIL=20171231T000000;BYDAY=MO,TU)interval_end
- Format YYYY-MM-DDsort_number
- The input will be set to the maximum number, if left empty.sort_number
- If you pass a number in between existing sorted entries, other entries will be automatically updated.department_ids
- Only required if no user_ids are given. Have to be existing department ids.user_ids
- Only required if no department_ids are given. Have to be existing user ids.
When saving a TaskAssignment
, there will be resulting Tasks and EntityPermissions created.
Update
To update a new TaskAssignment, create a PUT request to:
/api/tasks-2/task-assignments/
.
Request Keys
Key | Type | Default | Description |
---|---|---|---|
| string | - | The title of the assignment |
| string | - | The description of the assignment |
| integer | - | The id of the related TaskTemplate |
| integer | - | UserID of the creator |
| string | - | How to assign tasks to given departments/users |
| date | - | On which date this assignment starts |
| date | - | At which time this assignment starts. |
| interval | - | When to show the tasks of this assignment. |
| boolean | - | Indicates if this assignment is active. |
| rrule | - | How to repeat tasks from this assignment |
| date | - | When to stop repeating tasks from this assignment |
| integer | - | The sort number of this template. |
| array | - | Departments that should get tasks from this assignment |
| array | - | Users that should get tasks from this assignment |
Advanced Key-Specifications
description
- Has to be wrapped by a<p>
-Tagtask_template_id
- Has to be an existing TaskTemplate idcreator_user_id
- Has to be an existing user id. Will be set to current user if empty.assign_mode
- Has to be one of the following identifiers:one_of
any_of
one_of_user
any_of_user
start_date
- Format YYYY-MM-DDstart_time
- Format H:i:svisibility_start
- ISO 8601 DateInterval duration (example: P1M)active
- Will be set totrue
if emptyinterval
- iCalendar RFC5545 recurring rule (example: FREQ=DAILY;UNTIL=20171231T000000;BYDAY=MO,TU)interval_end
- Format YYYY-MM-DDsort_number
- The input will be set to the maximum number, if left empty.sort_number
- If you pass a number in between existing sorted entries, other entries will be automatically updated.department_ids
- Only required if no user_ids are given. Have to be existing department ids.user_ids
- Only required if no department_ids are given. Have to be existing user ids.
Delete
To delete a TaskAssignment, create a DELETE request to:
/api/tasks-2/task-assignments/{id}
.
Last updated