# Work Plan / Gantt

> Plan your work across multiple projects on a single Gantt chart

Personal per-user scheduling, independent of sprint assignment. Schedule tickets from any project you belong to on specific days. View your plan as a Gantt chart or monthly calendar, and reschedule tasks with drag and drop.

## Features

- **Cross-project scheduling**: A single schedule spans tickets from every project you can access. You only ever see your own entries, with no data leak between projects.
- **Junction model (User x Ticket x Date)**: An entry links a user, a ticket, and a date. A unique constraint prevents scheduling the same ticket twice on the same day.
- **Gantt view**: Timeline powered by frappe-gantt. Tasks render as horizontal bars, dragging updates the entry date in real time.
- **Calendar view**: Monthly grid with tasks inside day cells. A quick overview of your workload across the month.
- **Ticket integration**: A plan section in the ticket detail plus a badge on backlog and Kanban cards. Schedule without leaving the ticket view.
- **Per-user authorization**: Only the owner can edit or delete an entry. Scheduling requires membership in the ticket's project.

## How it works

1. **Open Work Plan**: The view is global, accessible from the main navigation. It defaults to the current month.
2. **Schedule a ticket**: Find a ticket via autocomplete and assign it a date. The entry appears on the Gantt and the calendar.
3. **Move tasks around**: Drag and drop on the Gantt chart changes the entry date. Filter the view by project.
4. **Manage the plan**: Edit notes, move to another day, or delete an entry. Changes only affect your own schedule.

## AI and MCP

The AI agent can plan your work via MCP: add tickets to the schedule, move them between days, check today's tasks, and read a specific ticket's schedule, 6 MCP tools.

- `schedule_ticket`: Schedule a ticket on a given day
- `update_work_plan_entry`: Move or edit a plan entry (date, position, notes)
- `delete_work_plan_entry`: Delete a plan entry (owner only)
- `list_work_plan`: Entries in a date range, cross-project, max 90 days
- `get_today_tasks`: Tasks scheduled for today
- `get_ticket_schedule`: Schedule for a specific ticket

## Technical details

- **Data model**: WorkPlanEntry (user_id, ticket_id, scheduled_date, position, notes). UniqueConstraint(user_id, ticket_id, scheduled_date), index (user_id, scheduled_date).
- **Routing**: Prefix /dashboard/plan. REST: POST/PATCH/DELETE /entries, GET /api/data, GET /api/tickets/search.
- **Data isolation**: The cross-project list returns only the current user's entries from projects they are a member of.
- **Frontend**: frappe-gantt for the timeline, a custom monthly grid for the calendar view.
