@aaronsb/jira-cloud-mcp 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -165,18 +165,29 @@ export class JiraClient {
|
|
|
165
165
|
})),
|
|
166
166
|
}));
|
|
167
167
|
}
|
|
168
|
-
async updateIssue(
|
|
168
|
+
async updateIssue(params) {
|
|
169
169
|
const fields = {};
|
|
170
|
-
if (summary)
|
|
171
|
-
fields.summary = summary;
|
|
172
|
-
if (description) {
|
|
173
|
-
fields.description = TextProcessor.markdownToAdf(description);
|
|
170
|
+
if (params.summary)
|
|
171
|
+
fields.summary = params.summary;
|
|
172
|
+
if (params.description) {
|
|
173
|
+
fields.description = TextProcessor.markdownToAdf(params.description);
|
|
174
|
+
}
|
|
175
|
+
if (params.parentKey !== undefined) {
|
|
176
|
+
fields.parent = params.parentKey ? { key: params.parentKey } : null;
|
|
174
177
|
}
|
|
175
|
-
if (
|
|
176
|
-
|
|
178
|
+
if (params.assignee !== undefined) {
|
|
179
|
+
// null unassigns, string assigns by account ID or name
|
|
180
|
+
fields.assignee = params.assignee ? { id: params.assignee } : null;
|
|
181
|
+
}
|
|
182
|
+
if (params.priority)
|
|
183
|
+
fields.priority = { id: params.priority };
|
|
184
|
+
if (params.labels)
|
|
185
|
+
fields.labels = params.labels;
|
|
186
|
+
if (params.customFields) {
|
|
187
|
+
Object.assign(fields, params.customFields);
|
|
177
188
|
}
|
|
178
189
|
await this.client.issues.editIssue({
|
|
179
|
-
issueIdOrKey: issueKey,
|
|
190
|
+
issueIdOrKey: params.issueKey,
|
|
180
191
|
fields,
|
|
181
192
|
});
|
|
182
193
|
}
|
|
@@ -176,7 +176,16 @@ async function handleCreateIssue(jiraClient, args) {
|
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
async function handleUpdateIssue(jiraClient, args) {
|
|
179
|
-
await jiraClient.updateIssue(
|
|
179
|
+
await jiraClient.updateIssue({
|
|
180
|
+
issueKey: args.issueKey,
|
|
181
|
+
summary: args.summary,
|
|
182
|
+
description: args.description,
|
|
183
|
+
parentKey: args.parent,
|
|
184
|
+
assignee: args.assignee,
|
|
185
|
+
priority: args.priority,
|
|
186
|
+
labels: args.labels,
|
|
187
|
+
customFields: args.customFields,
|
|
188
|
+
});
|
|
180
189
|
// Get the updated issue and render to markdown
|
|
181
190
|
const updatedIssue = await jiraClient.getIssue(args.issueKey, false, false);
|
|
182
191
|
const markdown = MarkdownRenderer.renderIssue(updatedIssue);
|