Skip to content

chore: work item count api response#52

Merged
Prashant-Surya merged 2 commits into
mainfrom
fix-workitem-count-response
Jun 16, 2026
Merged

chore: work item count api response#52
Prashant-Surya merged 2 commits into
mainfrom
fix-workitem-count-response

Conversation

@sangeethailango

@sangeethailango sangeethailango commented Jun 16, 2026

Copy link
Copy Markdown
Member

This pull request standardizes the API response format for work item group counts by always using the key count (instead of sometimes using total_count) in both flat and nested groupings. This change ensures consistency in the response structure and updates related documentation, type definitions, and print statements accordingly.

API response and model consistency:

  • The WorkItemGroupCountEntry model now always uses the count field for group counts, removing the previously used total_count field. This applies to both flat (single group) and nested (group + sub-group) responses.
  • The API documentation and docstrings in plane/api/work_items/base.py and plane/models/work_items.py have been updated to reflect the consistent use of count in all cases. [1] [2]
  • Example API responses and code comments now consistently show count instead of total_count for both top-level and nested group counts.
  • Print statements in count_workspace now reference entry.count instead of entry.total_count to match the updated model.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Corrected the response structure for grouped work item counts. Count values in sub-grouped entries are now consistently structured.
  • Documentation

    • Updated API documentation to reflect the current grouped count response format and field structure.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@sangeethailango, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 20 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7e2a55bd-e586-44e0-b865-a0558daa3bd7

📥 Commits

Reviewing files that changed from the base of the PR and between 86b6985 and 6062708.

📒 Files selected for processing (1)
  • pyproject.toml
📝 Walkthrough

Walkthrough

WorkItemGroupCountEntry.count changes from int | None to int (required), and the total_count: int | None field is removed. Docstrings across plane/models/work_items.py and plane/api/work_items/base.py are updated to reflect the new shape where subgroup entries carry count instead of total_count.

Changes

Grouped Work Item Count Schema

Layer / File(s) Summary
WorkItemGroupCountEntry field change and docstring alignment
plane/models/work_items.py, plane/api/work_items/base.py
Removes total_count: int | None from WorkItemGroupCountEntry, promotes count to a required int, and updates all docstring examples in both the model and API files to use count for grouped and sub-grouped totals.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A field named total_count hops away,
While count stands firm and required today.
Subgroups no longer carry the old name,
The schema is cleaner — the bunny's to blame!
🐇 count: int — simple, precise, and sane.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: work item count api response' is vague and overly broad, using non-descriptive phrasing that doesn't convey the specific nature of the changes. Consider a more specific title that highlights the key change, such as 'fix: update work item count response structure to use count field instead of total_count' or 'chore: correct work item count api response schema'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-workitem-count-response

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 and usage tips.

@sangeethailango sangeethailango changed the title fix: work item count api response chore: work item count api response Jun 16, 2026
@Prashant-Surya Prashant-Surya merged commit bbe69ef into main Jun 16, 2026
4 checks passed
@Prashant-Surya Prashant-Surya deleted the fix-workitem-count-response branch June 16, 2026 13:19
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.

3 participants