autotask_update_ticket_checklist_item
Update a ticket's checklist item to change its text, mark complete/incomplete, or reorder its position.
Instructions
Update a checklist item on a ticket — edit text, mark complete/incomplete, or change position.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticketId | Yes | The parent ticket ID | |
| itemId | Yes | The checklist item ID to update | |
| itemName | No | New text for the checklist item | |
| isCompleted | No | Mark the item complete (true) or incomplete (false) | |
| position | No | New ordering position for the item |
Implementation Reference
- src/handlers/tool.definitions.ts:1193-1222 (registration)Schema definition (inputSchema) and registration entry for the 'autotask_update_ticket_checklist_item' tool. Declares parameters: ticketId (required), itemId (required), itemName, isCompleted, position.
{ name: 'autotask_update_ticket_checklist_item', description: 'Update a checklist item on a ticket — edit text, mark complete/incomplete, or change position.', inputSchema: { type: 'object', properties: { ticketId: { type: 'number', description: 'The parent ticket ID' }, itemId: { type: 'number', description: 'The checklist item ID to update' }, itemName: { type: 'string', description: 'New text for the checklist item' }, isCompleted: { type: 'boolean', description: 'Mark the item complete (true) or incomplete (false)' }, position: { type: 'number', description: 'New ordering position for the item' } }, required: ['ticketId', 'itemId'] } }, - src/handlers/tool.handler.ts:1089-1096 (handler)Dispatch handler for the tool. Extracts ticketId, itemId, itemName, isCompleted, and position from args and delegates to AutotaskService.updateTicketChecklistItem().
['autotask_update_ticket_checklist_item', async (a) => { await s.updateTicketChecklistItem(a.ticketId, a.itemId, { itemName: a.itemName, isCompleted: a.isCompleted, position: a.position }); return { result: a.itemId, message: `Successfully updated ticket checklist item ${a.itemId}` }; }], - Service-layer implementation. Calls http.childUpdate('Tickets', ticketId, 'ChecklistItems', itemId, body) to PATCH the checklist item on the Autotask REST API.
async updateTicketChecklistItem( ticketId: number, itemId: number, data: Partial<AutotaskTicketChecklistItem> ): Promise<void> { const http = await this.ensureClient(); try { this.logger.debug(`Updating checklist item ${itemId} on ticket ${ticketId}:`, data); const body = { ...data, ticketID: ticketId } as Record<string, any>; await http.childUpdate('Tickets', ticketId, 'ChecklistItems', itemId, body); this.logger.info(`Checklist item ${itemId} updated on ticket ${ticketId}`); } catch (error) { this.logger.error(`Failed to update checklist item ${itemId} on ticket ${ticketId}:`, error); throw error; } } - src/types/autotask.ts:219-228 (schema)TypeScript interface for the AutotaskTicketChecklistItem entity, defining the shape of checklist item data used by the update tool.
export interface AutotaskTicketChecklistItem { id?: number; ticketID?: number; itemName?: string; isCompleted?: boolean; position?: number; completedByResourceID?: number; completedDateTime?: string; [key: string]: any; }