bulk operations fixes

- Frontend: implémente bulkDelete, bulkArchive, bulkRestore
- Backend: adapts ticket DTOs pour bulk operations
- Infrastructure: MCP server pour gestion bulk tickets
- Tests: coverage frontend + backend
This commit is contained in:
2026-07-28 20:38:07 +02:00
parent 73c6081ab8
commit bd4f76ae74
19 changed files with 597 additions and 35 deletions

View File

@ -919,7 +919,9 @@ fn is_ticket_policy_mutation_tool(name: &str) -> bool {
fn is_ticket_policy_bulk_mutation_tool(name: &str) -> bool {
matches!(
name,
"idea_ticket_bulk_update_status" | "idea_ticket_bulk_update_priority"
"idea_ticket_bulk_update_status"
| "idea_ticket_bulk_update_priority"
| "idea_ticket_bulk_delete"
)
}

View File

@ -62,6 +62,7 @@ pub fn is_ticket_tool(name: &str) -> bool {
| "idea_ticket_update_priority"
| "idea_ticket_bulk_update_status"
| "idea_ticket_bulk_update_priority"
| "idea_ticket_bulk_delete"
| "idea_ticket_read_carnet"
| "idea_ticket_update_carnet"
| "idea_ticket_link"
@ -255,6 +256,18 @@ pub fn catalogue() -> Vec<ToolDef> {
"additionalProperties": false
}),
},
ToolDef {
name: "idea_ticket_bulk_delete",
description: "Delete several IdeA tickets and return one result per ticket.",
input_schema: json!({
"type": "object",
"properties": {
"refs": refs.clone()
},
"required": ["refs"],
"additionalProperties": false
}),
},
ToolDef {
name: "idea_ticket_read_carnet",
description: "Read the editable carnet attached to a ticket.",

View File

@ -76,6 +76,7 @@ pub const WRITE_ACTION_TOOLS: &[&str] = &[
"idea_ticket_update_priority",
"idea_ticket_bulk_update_status",
"idea_ticket_bulk_update_priority",
"idea_ticket_bulk_delete",
"idea_ticket_update_carnet",
"idea_ticket_link",
"idea_ticket_unlink",

View File

@ -751,6 +751,7 @@ async fn tools_list_advertises_the_idea_tools_with_schemas() {
"idea_ticket_update_priority",
"idea_ticket_bulk_update_status",
"idea_ticket_bulk_update_priority",
"idea_ticket_bulk_delete",
"idea_ticket_read_carnet",
"idea_ticket_update_carnet",
"idea_ticket_link",
@ -771,8 +772,8 @@ async fn tools_list_advertises_the_idea_tools_with_schemas() {
assert!(!names.contains(&"idea_reply"));
assert_eq!(
tools.len(),
33,
"exactly the thirty-three exposed idea_* tools; got {names:?}"
34,
"exactly the thirty-four exposed idea_* tools; got {names:?}"
);
// Every tool advertises an object input schema.
@ -1371,13 +1372,14 @@ async fn bounded_ticket_mutation_tools_reject_other_issue_before_ticket_provider
"idea_ticket_bulk_update_priority",
json!({ "refs": ["#8"], "priority": "high" }),
),
(25, "idea_ticket_bulk_delete", json!({ "refs": ["#8"] })),
(
25,
26,
"idea_ticket_link",
json!({ "ref": "#8", "targetRef": "#9", "kind": "blocks", "expectedVersion": 1 }),
),
(
26,
27,
"idea_ticket_unlink",
json!({ "ref": "#8", "targetRef": "#9", "kind": "blocks", "expectedVersion": 1 }),
),
@ -1442,13 +1444,14 @@ async fn bounded_ticket_mutation_tools_allow_bound_issue_to_reach_ticket_provide
"idea_ticket_bulk_update_priority",
json!({ "refs": ["#7"], "priority": "high" }),
),
(35, "idea_ticket_bulk_delete", json!({ "refs": ["#7"] })),
(
35,
36,
"idea_ticket_link",
json!({ "ref": "#7", "targetRef": "#9", "kind": "blocks", "expectedVersion": 1 }),
),
(
36,
37,
"idea_ticket_unlink",
json!({ "ref": "#7", "targetRef": "#9", "kind": "blocks", "expectedVersion": 1 }),
),