Skip to content

Fix Jira Cloud All and classify presets by ticket status - #28579

Merged
nwparker merged 4 commits into
mainfrom
nwparker/jira-cloud-filters
Oct 14, 2026
Merged

nwparker merged 4 commits into
mainfrom
nwparker/jira-cloud-filters

Conversation

@nwparker

@nwparker nwparker commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​371 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​371
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​152 $\color{#cf222e}{\Huge{\mathbf{−}}}$​42 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​110

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

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

On macOS with background launch enabled and at most two workers, all 167 tests across the 12 files in src/main/jira pass on pinned main 64538a680c8. 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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

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

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (focused checks above; broad validation and packaging remain coordinated/CI checks)

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Preset JQL now distinguishes assigned, reported, and done issues and orders results by update time. Cloud All searches discover project identifiers and search projects in batches before sorting and limiting combined results. Project pagination can forward an abort signal and reject incomplete results. Raw JQL searches retain caller-provided JQL.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: 🔵 Low · up to 44fac

Cloud All may show a partial issue list if Jira returns an incomplete successful page. This is a bounded merge risk, but incomplete pages should be rejected.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Linked Issues check Warning [#16808] is implemented. buildJiraPresetJql uses statusCategory for Assigned, Reported, All, and Done. The PR also implements the bounded Cloud All search described in [#23617]. It discovers acces… Implement the repository-to-project configuration and use it to scope Jira task searches. Implement the requested repository defaults for worktree selection, name, and branch. Alternatively, remove the direct link to [#23617] if that featur…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Out of Scope Changes check Passed The production changes support the linked Jira objectives. They build status-category preset JQL, bound Cloud All searches by accessible projects, preserve Server/Data Center and custom-JQL behavior, …
Title check Passed The title clearly identifies the two primary changes: Jira Cloud All handling and preset classification by ticket status.
Description check Passed The description is complete and closely follows the repository template. It explains the user impact, implementation, rationale, linked issues, testing, visual proof, compatibility considerations, and…
Full details: Linked Issues check

Explanation

[#16808] is implemented. buildJiraPresetJql uses statusCategory for Assigned, Reported, All, and Done. The PR also implements the bounded Cloud All search described in [#23617]. It discovers accessible projects, batches project IDs, paginates issue pages, and reports incomplete reads and limits. However, [#23617] also requests repository-to-project mapping and repository-based task-list and worktree defaults. The changed files contain no such configuration or behavior, and the PR states that this work is a follow-up.

Resolution

Implement the repository-to-project configuration and use it to scope Jira task searches. Implement the requested repository defaults for worktree selection, name, and branch. Alternatively, remove the direct link to [#23617] if that feature is intentionally separate.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c120062-53f9-4a32-b05e-8519422e8c69
📥 Commits

Reviewing files that changed from the base of the PR and between 7551366 and 66cd6f2.

📒 Files selected for processing: 5
  • src/main/jira/jira-issue-search.ts
  • src/main/jira/jira-preset-filters.test.ts
  • src/main/jira/jira-project-queries.ts
  • src/main/jira/jira-record-pages.ts
  • src/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.

Comment thread src/main/jira/jira-issue-search.ts Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts
  • src/main/jira/jira-preset-filters.test.ts
  • src/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.

Comment thread src/main/jira/jira-issue-search.ts Resolved
@nwparker
nwparker force-pushed the nwparker/jira-cloud-filters branch from 44face1 to ab347f9 Compare October 14, 2026 10:11
@nwparker
nwparker merged commit ba81b43 into main Oct 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Jira preset filters key on resolution, so they show the wrong issues in projects without a resolution post-function

1 participant