update_effort_record
Modify logged work hours for specific tasks in Alibaba Cloud DevOps projects to maintain accurate time tracking and project management records.
Instructions
[Project Management] 更新登记实际工时
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organizationId | Yes | organizationId | |
| workitemId | Yes | 工作项唯一标识 | |
| id | Yes | 工时记录唯一标识 | |
| actualTime | Yes | 实际工时 | |
| description | No | 工作描述 | |
| gmtEnd | Yes | 工作开始结束日期 | |
| gmtStart | Yes | 工作开始日期 | |
| operatorId | No | 操作者的useId,个人token时该参数无效 | |
| workType | No | 工作类型 |
Implementation Reference
- tool-handlers/effort.ts:73-89 (handler)MCP tool handler for 'update_effort_record': parses input arguments using UpdateEffortRecordSchema and calls the underlying effort.updateEffortRecord function.case "update_effort_record": { const args = types.UpdateEffortRecordSchema.parse(request.params.arguments); await effort.updateEffortRecord({ organizationId: args.organizationId, workitemId: args.workitemId, id: args.id, actualTime: args.actualTime, description: args.description, gmtEnd: args.gmtEnd, gmtStart: args.gmtStart, operatorId: args.operatorId, workType: args.workType }); return { content: [{ type: "text", text: "Effort record updated successfully" }], }; }
- operations/projex/effort.ts:117-141 (helper)Core implementation of updateEffortRecord: validates parameters, constructs API URL, and performs PUT request to update the effort record via yunxiaoRequest.export async function updateEffortRecord( params: z.infer<typeof CreateEffortRecordRequestSchema> & { organizationId: string; workitemId: string; id: string; } ) { const validatedParams = CreateEffortRecordRequestSchema.parse({ actualTime: params.actualTime, description: params.description, gmtEnd: params.gmtEnd, gmtStart: params.gmtStart, operatorId: params.operatorId, workType: params.workType }); const url = `/oapi/v1/projex/organizations/${params.organizationId}/workitems/${params.workitemId}/effortRecords/${params.id}`; const response = await yunxiaoRequest(url, { method: "PUT", body: validatedParams }); return response; }
- tool-registry/effort.ts:38-42 (registration)Tool registration defining the name, description, and input schema (derived from UpdateEffortRecordSchema) for 'update_effort_record'.{ name: "update_effort_record", description: "[Project Management] 更新登记实际工时", inputSchema: zodToJsonSchema(UpdateEffortRecordSchema), },
- operations/projex/types.ts:548-558 (schema)Zod schema definition for UpdateEffortRecord input validation, including fields like organizationId, workitemId, id, actualTime, etc.export const UpdateEffortRecordSchema = z.object({ organizationId: z.string().describe("organizationId"), workitemId: z.string().describe("工作项唯一标识"), id: z.string().describe("工时记录唯一标识"), actualTime: z.number().positive().describe("实际工时"), description: z.string().max(500).optional().describe("工作描述"), gmtEnd: z.string().describe("工作开始结束日期"), gmtStart: z.string().describe("工作开始日期"), operatorId: z.string().optional().describe("操作者的useId,个人token时该参数无效"), workType: z.string().optional().describe("工作类型"), });