Skip to content

fix: correct archived work item count - #9852

Open
Vasist10 wants to merge 1 commit into
makeplane:previewfrom
Vasist10:preview
Open

Vasist10 wants to merge 1 commit into
makeplane:previewfrom
Vasist10:preview

Conversation

@Vasist10

@Vasist10 Vasist10 commented Sep 17, 2026

Copy link
Copy Markdown

Description

Fixes #9813.

Archived work items were not appearing in the Archived section when the project was using grouped or sub-grouped views.

The grouped archive pagination was using archived_at__isnull=True for the count_filter, which counts non-archived work items. This caused the paginator to report zero results for archived groups.

This changes the filter to archived_at__isnull=False for both grouped and sub-grouped archive views.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Not applicable.

Test Scenarios

  • Ran the relevant unit tests locally and verified they pass.
  • Manually verified the affected archive behavior.

References

Fixes #9813

Summary by CodeRabbit

  • Bug Fixes
    • Fixed archived issue list pagination counts so they accurately reflect the number of archived issues.
    • Ensured grouped and subgrouped views show consistent pagination totals.

@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 17, 2026

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~1 changed · 🔴 -0 removed · 0 flows · 1 file · commit 20c2c07


Architecture

Architecture diagram for makeplane/plane at 20c2c07

1 component touched across 3 lanes.

Open the interactive canvas


Data flow

No data-flow sequence changed in this PR.


View

  • Architecture lens
  • Data flow lens
  • Expand every detail

Tip

Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."

🪧 More tips
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists.
  • Untick Architecture lens or Data flow lens under View to hide a diagram, or tick Expand every detail to open every section. The comment redraws in a few seconds.
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through.
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change.
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time.
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time.
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs on every push.
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works.
  • Push a commit and the comment redraws for the new head. A slow older run never overwrites a newer one.
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion.

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

❤️ Share

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4aee515e-e918-452d-a629-25f8d63dda0a

📥 Commits

Reviewing files that changed from the base of the PR and between 174243b and 20c2c07.

📒 Files selected for processing (1)
  • apps/api/plane/app/views/issue/archive.py

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The archive view now counts archived issues in both subgrouped and grouped pagination paths. Both count filters match the archive queryset.

Changes

Archived issue pagination

Layer / File(s) Summary
Align archive pagination counts
apps/api/plane/app/views/issue/archive.py
Both count_filter instances now require archived_at__isnull=False, so pagination counts include archived issues.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 20c2c

Archived work items remain discoverable through both grouped archive pagination paths, so the change is mergeable.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: correcting the archived work item count.
Description check ✅ Passed The description includes the required sections, explains the bug and fix, identifies the change type, documents testing, and references issue #9813. Screenshots are correctly marked as not applicable.
Linked Issues check ✅ Passed The change addresses issue #9813. IssueArchiveViewSet.list now counts archived issues with archived_at__isnull=False in both grouped and subgrouped pagination paths. This matches get_queryset, w…
Out of Scope Changes check ✅ Passed The change is limited to the archive pagination count filter in apps/api/plane/app/views/issue/archive.py. Both changed lines support the linked issue by correcting archived-item counts. No unrelate…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

@CLAassistant

CLAassistant commented Sep 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

A single work item disappears after being archived.

2 participants