@atlassian-dc-mcp/jira 0.32.0 → 0.34.0

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.
package/src/index.ts CHANGED
@@ -139,7 +139,7 @@ server.tool(
139
139
 
140
140
  server.tool(
141
141
  "jira_linkIssues",
142
- `Create a link between two JIRA issues in the ${jiraInstanceType}. Use jira_getIssueLinkTypes to find valid link type names.`,
142
+ `Create a link between two JIRA issues in the ${jiraInstanceType}. Direction is easy to invert vs the Jira UI: inwardIssueKey is the issue that DISPLAYS the outward phrase (e.g. 'blocks'); outwardIssueKey displays the inward phrase (e.g. 'is blocked by'). After create, GET the first issue — it must have outwardIssue = the second key. Use jira_getIssueLinkTypes for valid type names.`,
143
143
  jiraToolSchemas.linkIssues,
144
144
  async (params) => {
145
145
  const result = await jiraService.linkIssues(params);
@@ -74,7 +74,7 @@ export class JiraService {
74
74
 
75
75
  async getIssue(issueKey: string, expand?: string, fields?: string[]) {
76
76
  return handleApiOperation(
77
- () => IssueService.getIssue(issueKey, expand, toIssueFieldSelection(fields ?? DEFAULT_ISSUE_FIELDS)),
77
+ () => IssueService.getIssue1(issueKey, expand, (fields ?? DEFAULT_ISSUE_FIELDS).join(',')),
78
78
  'Error getting issue'
79
79
  );
80
80
  }
@@ -171,7 +171,7 @@ export class JiraService {
171
171
 
172
172
  private async resolveIssueId(issueKey: string): Promise<string> {
173
173
  // The dev-status API is keyed by the numeric issue id, not the issue key.
174
- const issue = await IssueService.getIssue(issueKey, undefined, toIssueFieldSelection(['id']));
174
+ const issue = await IssueService.getIssue1(issueKey, undefined, 'id');
175
175
  if (!issue?.id) {
176
176
  throw new Error(`Could not resolve numeric id for issue ${issueKey}`);
177
177
  }
@@ -283,7 +283,7 @@ export class JiraService {
283
283
  if (!params.issueKey) {
284
284
  throw new Error('Either attachmentId or issueKey must be provided');
285
285
  }
286
- const issue = await IssueService.getIssue(params.issueKey, undefined, toIssueFieldSelection(['attachment']));
286
+ const issue = await IssueService.getIssue1(params.issueKey, undefined, 'attachment');
287
287
  const all = (((issue as any)?.fields?.attachment) ?? []) as Array<Record<string, any>>;
288
288
  const filtered = params.filename ? all.filter((a) => a?.filename === params.filename) : all;
289
289
  if (filtered.length === 0) {
@@ -409,8 +409,8 @@ export const jiraToolSchemas = {
409
409
  },
410
410
  getIssueLinkTypes: {},
411
411
  linkIssues: {
412
- inwardIssueKey: z.string().describe("Key of the inward issue (the one the inward link description applies to, e.g. the issue that 'is blocked by'). Example: PROJ-123"),
413
- outwardIssueKey: z.string().describe("Key of the outward issue (the one the outward link description applies to, e.g. the issue that 'blocks'). Example: PROJ-456"),
412
+ inwardIssueKey: z.string().describe("REST inward issue. In Jira UI THIS issue shows the OUTWARD phrase (e.g. 'blocks', 'split to'). For PROJ-123 to show 'blocks PROJ-456', pass inwardIssueKey=PROJ-123."),
413
+ outwardIssueKey: z.string().describe("REST outward issue. In Jira UI THIS issue shows the INWARD phrase (e.g. 'is blocked by', 'split from'). Same example: outwardIssueKey=PROJ-456."),
414
414
  linkType: z.string().describe("Name of the issue link type to apply (e.g. 'Blocks', 'Relates', 'Duplicate'). Use jira_getIssueLinkTypes to discover valid names for this JIRA installation."),
415
415
  comment: z.string().optional().describe("Optional comment added to the inward issue when the link is created, in JIRA Wiki Markup.")
416
416
  },