# Work items

> Issues and tasks on pipelines: identifiers, parents without cycles, several assignees, priority 0 to 4, estimates, start, end and due dates, locking, projects, iterations, batched edits and a progress tree.

- Category: Work management
- Module: `tasks`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/tasks
- Page: https://bettersupabase.com/blocks/tasks

## Install

```bash
npx better-supabase add tasks
```

The command also installs `updated-at`, `memberships`, `permissions`, `subjects`, `pipelines`.

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Required by tasks; add installs them too.
    "updated-at": {},
    memberships: {},
    permissions: {},
    subjects: {},
    pipelines: {},
    // Modes: "managed", "custom". The default is "managed".
    tasks: { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/tasks`.

## Events

- `work_item.archived`
- `work_item.assigned`
- `work_item.closed`
- `work_item.created`
- `work_item.deleted`
- `work_item.reopened`
- `work_item.updated`

## Related blocks

Requires: [memberships](https://bettersupabase.com/blocks/memberships.md), [permissions](https://bettersupabase.com/blocks/permissions.md), [subjects](https://bettersupabase.com/blocks/subjects.md), [pipelines](https://bettersupabase.com/blocks/pipelines.md)

Works with: [outbox](https://bettersupabase.com/blocks/outbox.md), [notifications](https://bettersupabase.com/blocks/notifications.md), [numbering](https://bettersupabase.com/blocks/numbering.md), [attachments](https://bettersupabase.com/blocks/attachments.md), [reminders](https://bettersupabase.com/blocks/reminders.md)

## Recipes

- [Work item board](https://bettersupabase.com/recipes/work-item-board.md): Work items in state columns, ordered by rank and moved through allowed transitions.
- [Entity form](https://bettersupabase.com/recipes/entity-form.md): A create dialog whose inputs come from `recordForm`: the entity's own fields and the organization's custom fields, validated together by `useRecordForm` before the Server Action runs.
- [Work item grid](https://bettersupabase.com/recipes/work-item-grid.md): A data grid of work items with filters, sorting and saved views.
- [My work](https://bettersupabase.com/recipes/my-work.md): What waits on the caller across the installed blocks, from `loadMyWork`: assigned work, approvals, due reminders, mentions and SLA warnings, each linked to its record.
