src.integrations.providers.planka_kanban module
Planka implementation of KanbanInterface.
Adapts the existing MCP Kanban client to work with the common interface.
-
class src.integrations.providers.planka_kanban.PlankaKanban[source]
Bases: KanbanInterface
Planka kanban board implementation.
-
__init__(config)[source]
Initialize Planka connection.
- Parameters:
config (Dict[str, Any]) β
- Dictionary containing:
-
-
async connect()[source]
Connect to Planka via MCP.
- Returns:
True if connection successful, raises exception otherwise.
- Return type:
bool
-
async disconnect()[source]
Disconnect from Planka.
- Return type:
None
-
async get_available_tasks()[source]
Get unassigned tasks from backlog.
- Returns:
List of available tasks from the backlog.
- Return type:
List[Task]
-
async get_all_tasks()[source]
Get all tasks from the board.
- Returns:
List of all tasks on the board.
- Return type:
List[Task]
-
async get_task_by_id(task_id)[source]
Get specific task by ID.
- Parameters:
task_id (str) β The ID of the task to retrieve.
- Returns:
The task if found, None otherwise.
- Return type:
Optional[Task]
-
async create_task(task_data)[source]
Create new task in Planka.
- Parameters:
task_data (Dict[str, Any]) β Dictionary containing task data (name, description, due_date).
- Returns:
The newly created task object.
- Return type:
Task
-
async update_task(task_id, updates)[source]
Update existing task.
- Parameters:
task_id (str) β The ID of the task to update.
updates (Dict[str, Any]) β Dictionary containing fields to update.
- Returns:
The updated task object.
- Return type:
Optional[Task]
-
async assign_task(task_id, assignee_id)[source]
Assign task to worker.
- Parameters:
-
- Returns:
True if assignment successful.
- Return type:
bool
-
async move_task_to_column(task_id, column_name)[source]
Move task to specific column.
- Parameters:
-
- Returns:
True if move successful.
- Return type:
bool
Add comment to task.
- Parameters:
-
- Returns:
True if comment added successfully.
- Return type:
bool
-
async get_project_metrics()[source]
Get project metrics.
- Returns:
Dictionary containing task counts by status.
- Return type:
Dict[str, Any]
-
async report_blocker(task_id, blocker_description, severity='medium')[source]
Report blocker on task.
- Parameters:
task_id (str) β The ID of the task to report blocker for.
blocker_description (str) β Description of the blocker.
severity (str) β Severity level (default is βmediumβ).
- Returns:
True if blocker reported successfully.
- Return type:
bool
-
async update_task_progress(task_id, progress_data)[source]
Update task progress.
- Parameters:
task_id (str) β The ID of the task to update progress for.
progress_data (Dict[str, Any]) β Dictionary containing progress, status, and message.
- Returns:
True if progress updated successfully.
- Return type:
bool
-
async upload_attachment(task_id, filename, content, content_type=None)[source]
Upload an attachment to a Planka card.
Uses the kanban-mcp attachment manager to upload files.
- Parameters:
task_id (str) β The ID of the task to attach the file to.
filename (str) β Name of the file to upload.
content (Union[str, bytes]) β The file content (string or bytes).
content_type (Optional[str]) β MIME type of the content.
- Returns:
Result dictionary with success status and attachment data.
- Return type:
Dict[str, Any]
-
async get_attachments(task_id)[source]
Get all attachments for a Planka card.
- Parameters:
task_id (str) β The ID of the task to get attachments for.
- Returns:
Result dictionary with success status and attachments list.
- Return type:
Dict[str, Any]
-
async download_attachment(attachment_id, filename, task_id=None)[source]
Download an attachment from Planka.
- Parameters:
attachment_id (str) β The ID of the attachment to download.
filename (str) β The filename to use for the downloaded attachment.
task_id (Optional[str]) β The task ID (not used for Planka).
- Returns:
Result dictionary with success status and attachment content.
- Return type:
Dict[str, Any]
-
async delete_attachment(attachment_id, task_id=None)[source]
Delete an attachment from Planka.
- Parameters:
-
- Returns:
Result dictionary with success status.
- Return type:
Dict[str, Any]
-
async update_attachment(attachment_id, filename=None, task_id=None)[source]
Update attachment metadata in Planka.
- Parameters:
attachment_id (str) β The ID of the attachment to update.
filename (Optional[str]) β New filename for the attachment.
task_id (Optional[str]) β The task ID (not used for Planka).
- Returns:
Result dictionary with success status and updated data.
- Return type:
Dict[str, Any]