Skip to main content
Glama

unassign_issue_from_user

Remove user assignment from a specific issue in Taiga project management by setting the assigned user to null. Requires session ID and issue ID for operation.

Instructions

Unassigns a specific issue (sets assigned user to null).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYes
session_idYes

Implementation Reference

  • The main handler function for the 'unassign_issue_from_user' tool. It is registered via the @mcp.tool decorator and implements the core logic by calling update_issue with assigned_to=None to unassign the issue.
    @mcp.tool("unassign_issue_from_user", description="Unassigns a specific issue (sets assigned user to null).") def unassign_issue_from_user(session_id: str, issue_id: int) -> Dict[str, Any]: """Unassigns an issue.""" logger.info( f"Executing unassign_issue_from_user: Issue {issue_id}, session {session_id[:8]}...") # Delegate to update_issue return update_issue(session_id, issue_id, assigned_to=None)
  • Helper function update_issue used by unassign_issue_from_user to perform the actual update on the Taiga API by setting assigned_to=None. This implements the core update logic including version handling and API call.
    @mcp.tool("update_issue", description="Updates details of an existing issue.") def update_issue(session_id: str, issue_id: int, **kwargs) -> Dict[str, Any]: """Updates an issue. Pass fields to update as keyword arguments (e.g., subject, description, status_id, assigned_to).""" logger.info( f"Executing update_issue ID {issue_id} for session {session_id[:8]} with data: {kwargs}") taiga_client_wrapper = _get_authenticated_client(session_id) # Use wrapper variable name try: # Use pytaigaclient edit pattern for partial updates if not kwargs: logger.info(f"No fields provided for update on issue {issue_id}") return taiga_client_wrapper.api.issues.get(issue_id) # Get current issue data to retrieve version current_issue = taiga_client_wrapper.api.issues.get(issue_id) version = current_issue.get('version') if not version: raise ValueError(f"Could not determine version for issue {issue_id}") # Use edit method for partial updates with keyword arguments updated_issue = taiga_client_wrapper.api.issues.edit( issue_id=issue_id, version=version, **kwargs ) logger.info(f"Issue {issue_id} update request sent.") return updated_issue except TaigaException as e: logger.error( f"Taiga API error updating issue {issue_id}: {e}", exc_info=False) raise e except Exception as e: logger.error( f"Unexpected error updating issue {issue_id}: {e}", exc_info=True) raise RuntimeError(f"Server error updating issue: {e}")
  • Helper function to retrieve and validate the authenticated Taiga client wrapper from the session store, used indirectly in the tool chain.
    def _get_authenticated_client(session_id: str) -> TaigaClientWrapper: """ Retrieves the authenticated TaigaClientWrapper for a given session ID. Raises PermissionError if the session is invalid or not found. """ client = active_sessions.get(session_id) # Also check if the client object itself exists and is authenticated if not client or not client.is_authenticated: logger.warning(f"Invalid or expired session ID provided: {session_id}") # Raise PermissionError - FastMCP will map this to an appropriate error response raise PermissionError( f"Invalid or expired session ID: '{session_id}'. Please login again.") logger.debug(f"Retrieved valid client for session ID: {session_id}") return client

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/talhaorak/pytaiga-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server