fix(jira): add explicit fields param to search/jql endpoint#3544
fix(jira): add explicit fields param to search/jql endpoint#3544waleedlatif1 merged 1 commit intostagingfrom
Conversation
PR SummaryLow Risk Overview When callers don’t provide Written by Cursor Bugbot for commit 0a69f1a. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR fixes a bug where the Jira Search Issues tool returned tickets with only the Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Tool as jiraSearchIssuesTool
participant Atlassian as Atlassian API
Client->>Tool: call(params)
alt cloudId provided
Tool->>Atlassian: GET /ex/jira/{cloudId}/rest/api/3/search/jql?jql=...&fields=*all
Atlassian-->>Tool: { issues: [...], nextPageToken, isLast, total }
else cloudId not provided
Tool->>Atlassian: GET /oauth/token/accessible-resources
Atlassian-->>Tool: [{ id: cloudId, ... }]
Tool->>Atlassian: GET /ex/jira/{cloudId}/rest/api/3/search/jql?jql=...&fields=*all
Atlassian-->>Tool: { issues: [...], nextPageToken, isLast, total }
end
Tool->>Tool: transformSearchIssue(issue) for each issue
Tool-->>Client: { success: true, output: { issues, nextPageToken, isLast, total } }
|
The GET /rest/api/3/search/jql endpoint requires an explicit `fields` parameter to return issue data. Without it, only the issue `id` is returned with all other fields empty. This adds `fields=*all` as the default when the user doesn't specify custom fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0a69f1a to
7964381
Compare
Summary
idpopulated, all other fields blank)GET /rest/api/3/search/jqlendpoint requires an explicitfieldsparameter — without it, only the issueidis returnedfields=*allas the default in both URL construction paths when the user doesn't specify custom fieldsRoot Cause
The newer
GET /rest/api/3/search/jqlendpoint behaves differently from the olderPOST /rest/api/3/search— it does not default to returning all navigable fields whenfieldsis omitted. Every other call site in the codebase (bulk_read.ts,issues/route.ts) already passesfieldsexplicitly;search_issues.tswas the only one that didn't.Test plan
fieldsparameter to verify user-specified field selection still works