feat(tools): add fields parameter to Jira search block#4091
feat(tools): add fields parameter to Jira search block#4091waleedlatif1 merged 3 commits intostagingfrom
Conversation
Expose the Jira REST API `fields` parameter on the search operation, allowing users to specify which fields to return per issue. This reduces response payload size by 10-15x, preventing 10MB workflow state limit errors for users with high ticket volume. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Wires this value through the block’s tool params by parsing the string into a trimmed string array and updates the block Reviewed by Cursor Bugbot for commit 987f723. Configure here. |
Greptile SummaryThis PR exposes the Jira REST API Confidence Score: 5/5Safe to merge — change is backwards compatible with no risk of regressions. Single-file change with a clear, contained scope. Edge cases (empty string, whitespace-only, undefined) are all handled correctly. The one P2 observation is an informational gap about output schema behaviour, not a correctness issue. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant JiraBlock as Jira Block (jira.ts)
participant Tool as jiraSearchIssuesTool
participant JiraAPI as Jira REST API
User->>JiraBlock: Enter fields (e.g. "key,summary,status")
JiraBlock->>JiraBlock: split(',').map(trim).filter(Boolean) → ["key","summary","status"]
JiraBlock->>Tool: params.fields = ["key","summary","status"]
Tool->>JiraAPI: GET /search/jql?fields=key,summary,status
JiraAPI-->>Tool: Reduced payload (~200 bytes/issue)
Tool->>Tool: transformSearchIssue() → fixed output shape (missing fields default to "" or null)
Tool-->>JiraBlock: { issues: [...], ... }
JiraBlock-->>User: Block output
Reviews (3): Last reviewed commit: "fix(tools): restore type annotation for ..." | Re-trigger Greptile |
Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit e40021d. Configure here.
The params object is untyped, so TypeScript cannot infer the string element type from .split() — the explicit annotation is required. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 987f723. Configure here.
Summary
fieldsquery parameter on the Search Issues operationkey,summary,status,priority) to return only what they needMotivation
Users with moderate-to-high ticket volume hit the 10MB workflow execution state limit because the search returns 21+ fields per issue. The
fieldsparameter reduces per-issue payload by 10-15x (e.g., ~2-3KB → ~200 bytes), keeping workflows well under the limit.Changes
apps/sim/blocks/blocks/jira.ts: AddedfieldssubBlock (short-input, search operation only), wired throughtools.config.params(splits comma string → array), added to block inputs definitiontools/jira/search_issues.ts) already had fullfieldssupport — no tool changes neededTest plan
key,summary,statusand run — verify only those fields are returnedkey, summary, statusare trimmed correctly