# Task
Tasks are the fundamental units of work within a board. They represent individual item that need to be managed, tracked, or completed. Tasks are highly versatile and can be customized to hold all the information related to a specific work.
# Creating a Task
If you want to create a task:
FluentBoardsApi('tasks')->create($taskData);
1
FluentBoardsApi()
this is fluent-boards global api function. You need to pass 'tasks'
argument to access all task related api.
create()
method is used to create a new task. This function takes $taskData
as an argument which must be an associative array.
$taskData = [
'title' => 'Test Task',
'board_id' => 1,
'stage_id' => 2,
'priority' => 'low',
'status' => 'open'
];
1
2
3
4
5
6
7
2
3
4
5
6
7
$taskData['title']
string
required$taskData['board_id']
integer
required$taskData['stage_id']
integer
required$taskData['priority']
string
$taskData['status']
string
# Getting Tasks of a Board
FluentBoardsApi('tasks')->getTasksByBoard($boardId, $with = []);
1
Parameters
- $boardId
int
required - $with
array
Return array
# Getting a task
FluentBoardsApi('tasks')->getTask($taskId);
1
Parameters
- $taskId
int
required
Return object
# Getting tasks created by an user
FluentBoardsApi('tasks')->getTasksCreatedBy($userId, $with = []);
1
Parameters
- $userId
int
required - $with
array
Return array
# Adding assignees to a task
FluentBoardsApi('tasks')->addAssignees($taskId, $assigneeIds = []);
1
Parameters
- $taskId
int
required - $assigneeIds
array
required
Return boolean
# Removing assignees from a task
FluentBoardsApi('tasks')->removeAssignees($taskId, $assigneeIds = []);
1
Parameters
- $taskId
int
required - $assigneeIds
array
required
Return boolean
# Attaching labels to a task
FluentBoardsApi('tasks')->attachLabels($taskId, $labelIds = []);
1
Parameters
- $taskId
int
required - $labelIds
array
required
Return boolean
# Removing labels from a task
FluentBoardsApi('tasks')->removeLabels($taskId, $labelIds = []);
1
Parameters
- $taskId
int
required - $labelIds
array
required
Return boolean
← Stages