jira_update_issue_advanced
Update Jira issues comprehensively by modifying summary, description, priority, assignee, labels, components, fixVersions, affectsVersions, and custom fields. Use jira_get_edit_meta first to discover editable fields and allowed values.
Instructions
Update a Jira issue with full field support including fixVersions, components, and custom fields. Use jira_get_edit_meta first to discover editable fields and allowed values.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The Jira issue key | |
| summary | No | New summary | |
| description | No | New description | |
| priority | No | New priority name | |
| assignee | No | New assignee username | |
| labels | No | New labels | |
| components | No | Component names | |
| fixVersions | No | Fix version names | |
| affectsVersions | No | Affects version names | |
| customFields | No | Custom fields as key-value pairs |
Implementation Reference
- src/index.ts:1238-1277 (handler)The main handler for the jira_update_issue_advanced tool. Parses input arguments using Zod schema, constructs the fields object for update (handling components, versions, custom fields), calls jiraClient.updateIssueRaw, and returns success message.case "jira_update_issue_advanced": { const { issueKey, summary, description, priority, assignee, labels, components, fixVersions, affectsVersions, customFields, } = UpdateIssueAdvancedSchema.parse(args); const fields: Record<string, unknown> = {}; if (summary) fields.summary = summary; if (description) fields.description = description; if (priority) fields.priority = { name: priority }; if (assignee) fields.assignee = { name: assignee }; if (labels) fields.labels = labels; if (components) fields.components = components.map((name) => ({ name })); if (fixVersions) fields.fixVersions = fixVersions.map((name) => ({ name })); if (affectsVersions) fields.versions = affectsVersions.map((name) => ({ name })); // Merge custom fields if (customFields) { Object.assign(fields, customFields); } await jiraClient.updateIssueRaw(issueKey, fields); return { content: [ { type: "text", text: `Issue ${issueKey} updated successfully` }, ], }; }
- src/index.ts:164-181 (schema)Zod schema used for input validation in the tool handler. Defines structure and descriptions for all parameters including customFields.const UpdateIssueAdvancedSchema = z.object({ issueKey: z.string().describe("The Jira issue key"), summary: z.string().optional().describe("New summary"), description: z.string().optional().describe("New description"), priority: z.string().optional().describe("New priority name"), assignee: z.string().optional().describe("New assignee username"), labels: z.array(z.string()).optional().describe("New labels"), components: z.array(z.string()).optional().describe("Component names"), fixVersions: z.array(z.string()).optional().describe("Fix version names"), affectsVersions: z .array(z.string()) .optional() .describe("Affects version names"), customFields: z .record(z.unknown()) .optional() .describe("Custom fields as key-value pairs"), });
- src/index.ts:601-640 (registration)Tool registration entry in the ListTools response array, including name, description, and inputSchema matching the Zod schema.{ name: "jira_update_issue_advanced", description: "Update a Jira issue with full field support including fixVersions, components, and custom fields. Use jira_get_edit_meta first to discover editable fields and allowed values.", inputSchema: { type: "object", properties: { issueKey: { type: "string", description: "The Jira issue key" }, summary: { type: "string", description: "New summary" }, description: { type: "string", description: "New description" }, priority: { type: "string", description: "New priority name" }, assignee: { type: "string", description: "New assignee username" }, labels: { type: "array", items: { type: "string" }, description: "New labels", }, components: { type: "array", items: { type: "string" }, description: "Component names", }, fixVersions: { type: "array", items: { type: "string" }, description: "Fix version names", }, affectsVersions: { type: "array", items: { type: "string" }, description: "Affects version names", }, customFields: { type: "object", description: "Custom fields as key-value pairs", }, }, required: ["issueKey"], }, },
- src/jira-client.ts:436-444 (helper)Core helper method in JiraClient that performs the actual Jira REST API PUT request to update the issue with arbitrary fields.async updateIssueRaw( issueKey: string, fields: Record<string, unknown> ): Promise<void> { await this.request<void>(`/issue/${issueKey}`, { method: "PUT", body: JSON.stringify({ fields }), }); }