Repository navigation
Fix Jira Cloud All and classify presets by ticket status - #28579
Conversation
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
8c120062-53f9-4a32-b05e-8519422e8c69
📒 Files selected for processing: 5
src/main/jira/jira-issue-search.tssrc/main/jira/jira-preset-filters.test.tssrc/main/jira/jira-project-queries.tssrc/main/jira/jira-record-pages.tssrc/shared/jira-preset-jql.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
39669fc to
883d0ff
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2a85a54a-a5f2-4352-8e3e-3651fd53c345
📥 Commits
Reviewing files that changed from the base of the PR and between 883d0ff9b3119e5db0aa999e1cf1d0e309baccb8 and 44face1662d725696936e6282e4451e366d3fa8e.
📒 Files selected for processing: 3
src/main/jira/jira-issue-search.tssrc/main/jira/jira-preset-filters.test.tssrc/main/jira/jira-record-pages.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
Reference the Cloud unbounded-query investigation in #23645 while preserving older open work with project restrictions. Co-authored-by: ggbdpq <[email protected]>
44face1 to
ab347f9
Compare
ELI5
Jira's All list can fail on Cloud, and completed tickets can appear as open when a project's workflow forgets to fill in the resolution field. Orca now follows the ticket's status and searches every project the account can access, including open tickets that have not changed recently.
What Changed
Assigned, Reported, All, and Done now use Jira's status category instead of resolution. Cloud All discovers all project pages and searches their IDs in batches of 100. It follows each batch’s issue page tokens until reaching the requested limit or the last page, then sorts the combined results before applying the existing issue limit. Project discovery and issue pages share the search deadline; missing issue arrays, missing continuation tokens on unfinished pages, failed reads, and page safety limits produce errors instead of silently omitting old work. Server/Data Center still uses its classic search endpoint, and custom JQL passes through unchanged.
Why
Status categories belong to the status itself, so they work when a workflow leaves resolution empty on completion or fails to clear it when reopening a ticket. Project restrictions satisfy Cloud's search requirement while preserving the meaning of All. A 90-day cutoff would make the error disappear by hiding older open tickets.
Reference: #23645 by @ggbdpq (ggbdpq [email protected]), which identified the Cloud request failure and tested the distinction between presets and custom JQL. Credit is included in the commit. This adapts that investigation with complete project bounds instead of its recency cutoff.
Linked Issue
Fixes #16808.
Addresses the Cloud All bug in #23617. The repository-to-project mapping requested in #23617 and #12753 remains a separate follow-up; the mapping portion remains outside this PR.
Visual Proof
N/A — request/query changes only; no renderer components, layout, or interaction controls change. Regression fixtures demonstrate the returned ticket lists.
Testing
On macOS with background launch enabled and at most two workers, all 167 tests across the 12 files in
src/main/jirapass on pinned main64538a680c8. The refresh preserves the landed strict-read arguments and site admission for list/search/project reads. Complete changed-code quality passes across five files with zero findings, and formatting, lint, anti-slop, diff, and the full focus-read gate pass.Seven of eight original regressions reproduced the Cloud request failure and stale-resolution inversion. Five of six issue-pagination regressions failed against the prior one-page implementation. All four new malformed-response regressions fail against the prior pagination source: successful pages omitted or nullified
issues, or marked themselves unfinished without a continuation token. After the fix these responses produce explicit errors. Metadata-less terminal responses remain compatible, empty pages with valid tokens continue, and the requested limit still bounds each batch.The Jira implementation preserves project batching, Server/DC and custom-JQL behavior, cross-site partial-success policy, repeated-token/page guards, and the original shared cancellation deadline. Standalone compiler validation is coordinated separately and current-head CI is pending, not claimed green. No full/release build or live Jira Cloud account was exercised; the Cloud 400 reproduction is a labeled API fixture.
Review
Merge risk: Low for the scoped change after the coordinated standalone compiler check. The fresh CI result is recorded separately and is not claimed green. The change is confined to query construction and bounded reads on the execution host. Regression fixtures cover both Cloud and Server behavior, complete pagination, error handling, deadline cancellation, and custom JQL passthrough. Cloud All uses the existing project-list permission and adds project-page requests. Very large sites can hit the existing 30-second search deadline or 100-page safety limit; they receive an explicit error and can use project-specific JQL. Query batches bound request size. The existing cross-site partial-success policy is preserved.
Agent skill upstream boundary
Notes
The code runs on the execution host for native and SSH Jira accounts, without local filesystem or Git assumptions, so folder workspaces work too. There are no new RPC fields, stream frames, credentials, platform commands, shortcut behaviors, or provider-specific review logic. Older clients receive the corrected issue lists from an updated host; mobile readers use the same host results. No native windows were opened.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (focused checks above; broad validation and packaging remain coordinated/CI checks)