ppm_issue_assign
Transition an issue from 'new' to 'assigned' to mark it as assigned.
Instructions
Move an issue from 'new' to 'assigned'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/qod_ppm_mcp/server.py:292-296 (handler)Handler function for ppm_issue_assign tool. Calls the 'action_issue_assign' method on the ppm.risk Odoo model to transition an issue from 'new' to 'assigned', then returns the updated state.
@mcp.tool() def ppm_issue_assign(issue_id: int) -> dict[str, Any]: """Move an issue from 'new' to 'assigned'.""" client().call_action("ppm.risk", "action_issue_assign", [issue_id]) return _read_state("ppm.risk", issue_id, _ISSUE_FIELDS) - src/qod_ppm_mcp/server.py:282-289 (schema)Fields read back after the assign action to return the updated issue state.
_ISSUE_FIELDS = [ "name", "state", "issue_state", "project_id", "owner_id", "date_resolved", ] - src/qod_ppm_mcp/server.py:292-292 (registration)Registration via @mcp.tool() decorator on the FastMCP instance.
@mcp.tool() - src/qod_ppm_mcp/client.py:122-124 (helper)Helper method call_action on OdooClient that invokes the button method via execute_kw.
def call_action(self, model: str, method: str, ids: list[int]) -> Any: """Invoke an `action_*` button method on the given record ids.""" return self.execute_kw(model, method, [ids]) - src/qod_ppm_mcp/server.py:30-34 (helper)Helper to read state fields after the action call, used to return the result.
def _read_state(model: str, rec_id: int, fields: list[str]) -> dict[str, Any]: rows = client().read(model, [rec_id], fields) if not rows: raise ValueError(f"{model} id={rec_id} not found") return rows[0]