# Projects, sprints and planning

> A project owns its tasks, sprints, milestones and goals; Planning reads every project's sprints, the organization's availability and each person's workload.

**What this is:** how TasKadence organizes work, and the operations behind each screen of the app. **When you need it:** building a sprint board, a capacity report or anything that groups tasks.

## A project owns its work

Tasks, sprints, milestones and goals each belong to one project. In the app, everything a project owns is one of its tabs:

| Tab | What it holds | Read it with |
| --- | --- | --- |
| Details | Name, status, dates, leads | [`projects.read`](https://docs.taskadence.com/reference/operations/projectsread/) |
| Tasks (List | Kanban) | The project’s tasks | [`tasks.list`](https://docs.taskadence.com/reference/operations/taskslist/) with `filter[project]` |
| Milestones (List | Timeline) | Dated checkpoints and their tasks | [`milestones.list`](https://docs.taskadence.com/reference/operations/milestoneslist/) |
| Goals (List | Timeline) | Named groups of tasks toward one outcome | [`goals.list`](https://docs.taskadence.com/reference/operations/goalslist/) |
| Resources | Links and files | [`project-resources.list`](https://docs.taskadence.com/reference/operations/project-resourceslist/) |
| Sub-projects | Child projects | [`projects.list`](https://docs.taskadence.com/reference/operations/projectslist/) with `filter[parent]` |
| Settings | Members and their roles | [`project-members.list`](https://docs.taskadence.com/reference/operations/project-memberslist/) |

[`milestones.list_org`](https://docs.taskadence.com/reference/operations/milestoneslist_org/) and [`goals.org`](https://docs.taskadence.com/reference/operations/goalsorg/) read every project’s at once, grouped by project.

A project’s `position` orders the Planning tree; org owners and admins set it with [`projects.update`](https://docs.taskadence.com/reference/operations/projectsupdate/).

## Adding people to a project

[`project-members.create_batch`](https://docs.taskadence.com/reference/operations/project-memberscreate_batch/) adds up to 50 people at once, each with their own [role](https://docs.taskadence.com/guides/roles/), all or nothing. The checks are those of [`project-members.create`](https://docs.taskadence.com/reference/operations/project-memberscreate/): each person must belong to the project’s organization (a guest too), or the call is a 422 and nobody is added. Someone already in the project comes back in `skipped` (`already_member`).

**curl**


```bash
curl -X POST "$TASKADENCE_API_URL/v1/projects/$PROJECT_ID/members/batch" \
  -H "Authorization: Bearer $TASKADENCE_TOKEN" -H "Content-Type: application/json" \
  -d '{"members": [{"user_id": "3f1c2a9e-0b7d-4c1e-9a55-2b8f0d6e4a10", "project_role": "member"}, {"user_id": "b3c1e2d4-1234-5678-9abc-def012345678", "project_role": "viewer"}]}'
```

**Python**


```python
result = tm.project_members.create_batch(project_id, [
    {"user_id": "3f1c2a9e-0b7d-4c1e-9a55-2b8f0d6e4a10", "project_role": "member"},
    {"user_id": "b3c1e2d4-1234-5678-9abc-def012345678", "project_role": "viewer"},
])
print(len(result.added), [s.user_id for s in result.skipped])
```

## Tasks

A task has no team, section or test-run field. Its sprint is picked from its own project’s sprints, with [`tasks.set_sprint`](https://docs.taskadence.com/reference/operations/tasksset_sprint/) or `sprint_id` on a create or update. Who follows a task and gets its emails is in [Tasks and subscribers](https://docs.taskadence.com/guides/tasks/).

## Sprints belong to a project

Create one with [`sprints.create`](https://docs.taskadence.com/reference/operations/sprintscreate/). Its name is unique among the project’s live sprints, and `position` orders them.

-   A task outside the project cannot join: A task joins only a sprint of its own project: the sprint belongs to another project, or the task has none (`errors[0]` names both projects; code `sprint_project_mismatch`).
-   Moving a task to another project takes it out of its sprint.
-   A sprint moves to another project with [`sprints.update`](https://docs.taskadence.com/reference/operations/sprintsupdate/) only while it is empty: A sprint moves to another project only while it holds no task; take its tasks out first (code `sprint_not_empty`, `errors[0].task_count`).

A task joins only a sprint of its own project

## Planning

Planning is the company-wide view in the app, one tab per question:

| Tab | What it shows | Read it with |
| --- | --- | --- |
| Sprints | Projects in `position` order, each with its sprints | [`sprints.list_org`](https://docs.taskadence.com/reference/operations/sprintslist_org/), grouped by `project_id` |
| Capacity (Calendar | People) | Who is away, and how much open work each person has | [`availability.range`](https://docs.taskadence.com/reference/operations/availabilityrange/), [`workload.read`](https://docs.taskadence.com/reference/operations/workloadread/) |
| Tasks | A Kanban of every project’s tasks, grouped by sprint | [`tasks.list`](https://docs.taskadence.com/reference/operations/taskslist/), grouped by `sprint_id` |

## Capacity

Availability is per person, across the organization. [`availability.range`](https://docs.taskadence.com/reference/operations/availabilityrange/) returns every member and their time away in one window. Mark your own days with [`availability.mark_mine`](https://docs.taskadence.com/reference/operations/availabilitymark_mine/); owners and admins mark anyone’s with [`availability.create`](https://docs.taskadence.com/reference/operations/availabilitycreate/).

[`workload.read`](https://docs.taskadence.com/reference/operations/workloadread/) counts each person’s open work, flags who is `heavy` and lists their next tasks. Pass `project_id` to see one project’s people.

---
Source: https://docs.taskadence.com/guides/planning/
