Skip to content

feat: Move tasks to another project through the MCP tools EXO-93025 - #741

Open
AzmiTouil wants to merge 1 commit into
developfrom
backport/EXO-93025-move-tasks-between-projects
Open

AzmiTouil wants to merge 1 commit into
developfrom
backport/EXO-93025-move-tasks-between-projects

Conversation

@AzmiTouil

Copy link
Copy Markdown
Contributor

Why
A user with many tasks to move from one project to another can ask the AI (EVA or Claude, through the MCP tools) to do it; no MCP tool moved a task to another project (EXO-93025).

How

  • New MCP tool move_tasks_to_project (TaskMcpTool#moveTasksToProject, ai-tool-definitions.json): up to 100 task ids, a target project and an optional status of that project, its default status otherwise; require_approval, declared destructive like update_task_status.
  • The tool checks first: the target project's view permission, every task's edit permission, the status belonging to the target project. A target project without statuses gets its initial ones, only after those checks.
  • TaskService#moveTasks writes the move in one @ContainerTransactional(atomic = true) transaction: a task refused midway rolls the earlier writes back, nothing is moved. The update events are broadcast after it returns, so after the commit on the MCP path, which opens no transaction of its own.
  • TaskServiceImpl#updateTask(long, TaskDto, Identity) is split into authorizeUpdate, persistUpdate and broadcastUpdate, so the bulk move reuses the single-task move's authorization as is.
  • The tasks keep their labels, as a move from the task drawer does.
  • Tests: TaskMcpToolTest (the tool's checks and their order, the definition's hints), TaskServiceMoveTasksTest (real container and database: all moved and events after the commit; refused midway, none moved and no event).

Knowledge: Meeds-io/eng-standards#1213, #1214, #1215, #1231

This change is classified N1 (computed at b089b07): its approver must be an Archi/Dev who knows it is N1, not an approval on AI review alone; author ≠ approver.

🤖 Generated with Claude Code

…726)

**Why**
A user with many tasks to move from one project to another can ask the
AI (EVA or Claude, through the MCP tools) to do it; no MCP tool moved a
task to another project (EXO-93025).

**How**
- New MCP tool `move_tasks_to_project`
(`TaskMcpTool#moveTasksToProject`, `ai-tool-definitions.json`): up to
100 task ids, a target project and an optional status of that project,
its default status otherwise; `require_approval`, declared destructive
like `update_task_status`.
- The tool checks first: the target project's view permission, every
task's edit permission, the status belonging to the target project. A
target project without statuses gets its initial ones, only after those
checks.
- `TaskService#moveTasks` writes the move in one
`@ContainerTransactional(atomic = true)` transaction: a task refused
midway rolls the earlier writes back, nothing is moved. The update
events are broadcast after it returns, so after the commit on the MCP
path, which opens no transaction of its own.
- `TaskServiceImpl#updateTask(long, TaskDto, Identity)` is split into
`authorizeUpdate`, `persistUpdate` and `broadcastUpdate`, so the bulk
move reuses the single-task move's authorization as is.
- The tasks keep their labels, as a move from the task drawer does.
- Tests: `TaskMcpToolTest` (the tool's checks and their order, the
definition's hints), `TaskServiceMoveTasksTest` (real container and
database: all moved and events after the commit; refused midway, none
moved and no event).

Knowledge: Meeds-io/eng-standards#1213, #1214, #1215, #1231

This change is classified N1 (computed at b089b07): its approver must
be an Archi/Dev who knows it is N1, not an approval on AI review alone;
author ≠ approver.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit dd2b4bb)
@AzmiTouil

Copy link
Copy Markdown
Contributor Author

Source: #726, feature/maintenance, merged 2026-11-13; approved by its reviewer at 9767225f (base a1ff068c). Validated on the feature/maintenance acceptance server (EXO-93025). After the nightly rebase of feature/maintenance, it is dd2b4bb2 as of feature/maintenance @ 6952168e, paired by patch-id. Its known limits hold as its body states them.

Picks:

  1. dd2b4bb2 → feat: Move tasks to another project through the MCP tools EXO-93025 (#726), with its (cherry picked from commit dd2b4bb2…) trail.

Adaptations: none. The pick applied clean and no commit was added.

Verification:

Level: N1, restated from #726 (new MCP tool definition; ACL checks in TaskMcpTool#moveTasksToProject and TaskServiceImpl#authorizeUpdate). A backport from a reviewed lineage whose picks equal the approved source merges on its first approval (ai-review-and-merge.md §3).

@sonarqubecloud

Copy link
Copy Markdown

@AzmiTouil
AzmiTouil requested review from Jihed525 and ahamdi November 16, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant