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

RelationKeyTypeRelation Field(s)

taskTemplate

Belongs to

task_template_id

departments

Belongs to many

Intermediate table

users

Belongs to many

Intermediate table

creator

Belongs to

user_id

tasks

Has many

task.task_assignment_id

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

KeyTypeDefaultDescription

title*

string

-

The title of the assignment

description

string

-

The description of the assignment

task_template_id*

integer

-

The id of the related TaskTemplate

creator_user_id*

integer

-

UserID of the creator

assign_mode*

string

-

How to assign tasks to given departments/users

start_date*

date

-

On which date this assignment starts

start_time*

date

-

At which time this assignment starts.

visibility_start

interval

-

When to show the tasks of this assignment.

active

boolean

-

Indicates if this assignment is active.

interval

rrule

-

How to repeat tasks from this assignment

interval_end

date

-

When to stop repeating tasks from this assignment

sort_number

integer

-

The sort number of this template.

department_ids*

array

-

Departments that should get tasks from this assignment

user_ids*

array

-

Users that should get tasks from this assignment

Keys with * are required.

Advanced Key-Specifications

  • description - Has to be wrapped by a <p>-Tag

  • task_template_id - Has to be an existing TaskTemplate id

  • creator_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-DD

  • start_time - Format H:i:s

  • visibility_start - ISO 8601 DateInterval duration (example: P1M)

  • active - Will be set to true if empty

  • interval - iCalendar RFC5545 recurring rule (example: FREQ=DAILY;UNTIL=20171231T000000;BYDAY=MO,TU)

  • interval_end - Format YYYY-MM-DD

  • sort_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

KeyTypeDefaultDescription

title

string

-

The title of the assignment

description

string

-

The description of the assignment

task_template_id

integer

-

The id of the related TaskTemplate

creator_user_id

integer

-

UserID of the creator

assign_mode

string

-

How to assign tasks to given departments/users

start_date

date

-

On which date this assignment starts

start_time

date

-

At which time this assignment starts.

visibility_start

interval

-

When to show the tasks of this assignment.

active

boolean

-

Indicates if this assignment is active.

interval

rrule

-

How to repeat tasks from this assignment

interval_end

date

-

When to stop repeating tasks from this assignment

sort_number

integer

-

The sort number of this template.

department_ids

array

-

Departments that should get tasks from this assignment

user_ids

array

-

Users that should get tasks from this assignment

Advanced Key-Specifications

  • description - Has to be wrapped by a <p>-Tag

  • task_template_id - Has to be an existing TaskTemplate id

  • creator_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-DD

  • start_time - Format H:i:s

  • visibility_start - ISO 8601 DateInterval duration (example: P1M)

  • active - Will be set to true if empty

  • interval - iCalendar RFC5545 recurring rule (example: FREQ=DAILY;UNTIL=20171231T000000;BYDAY=MO,TU)

  • interval_end - Format YYYY-MM-DD

  • sort_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