[PLT-4090] Add batch_ids filter to project.get_overview()#2060
Merged
Conversation
Extend Project.get_overview() with an optional batch_ids parameter that scopes workflow state counts to one or more batches via the existing workstreamStateCounts(batchIds) GraphQL field. Batch-scoped calls omit issues (not batch-filterable) and pass a batch search query into taskQueues.dataRowCount for details=True queue breakdowns. https: //labelbox.atlassian.net/browse/PLT-4090 Co-authored-by: Cursor <cursoragent@cursor.com>
maciejtatol
requested review from
ChuckTerry,
KahvehS,
KeshavSahoo,
RainIwakura,
cyrusj89,
labelbox-engineering and
ramy1951
July 9, 2026 14:56
mrobers1982
approved these changes
Jul 9, 2026
| pass | ||
|
|
||
|
|
||
| _MAX_BATCH_IDS = 1000 |
Contributor
There was a problem hiding this comment.
Is there a similar server-side enforcement?
Contributor
Author
There was a problem hiding this comment.
I'll check it, good call-out
mrobers1982
added a commit
that referenced
this pull request
Jul 9, 2026
project.py, test_batch.py, and test_project.py (last touched by #2060) were not formatted per the repo's ruff config, failing `rye fmt --check` on every PR. Formatted with ruff 0.8.2 (the version bundled by CI's rye 0.43.0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: LINK
Description
Problem
Customers such as Pinterest need to poll batch completion status programmatically (To Label / In Review / In Rework / Done counts per batch). Today the only option is running multiple project exports with batch_ids + workflow_status filters - each export takes minutes. For hourly polling across many batches, this is expensive and slow.
Solution
Extend Project.get_overview() with an optional batch_ids parameter that returns the same workflow-state counts as the project Overview tab, scoped to one or more batches - without exporting label data.
Query:
ProjectGetOverviewPyApi(still usesexperimental=True / /_gqlfor issues on project-wide calls)Validation:
batch_ids must be a non-empty list (empty list raises ValueError - backend treats [] as no filter, which would silently return project-wide counts)
Max 1000 batch IDs per call
Return type change: ProjectOverview.issues and ProjectOverviewDetailed.issues are now Optional[int] = None (always populated for project-wide calls; None when batch-scoped)
Test on Local
Project:
UI view:
Test script:
Execute script:
Type of change
Please delete options that are not relevant.
All Submissions
New Feature Submissions
Changes to Core Features
Note
Cursor Bugbot is generating a summary for commit 77cc539. Configure here.