Add workflow column filtering to cards#2787
Merged
flavorjones merged 1 commit intobasecamp:mainfrom Apr 14, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds column_keys[] filtering support to cards, enabling CLI clients and API consumers to fetch cards from specific workflow columns or pseudo-columns (maybe, not_now, done) without downloading all cards client-side. The feature includes:
Changes:
- Add
column_keys[]as a supported query parameter with support for workflow column IDs and pseudo-column aliases - Normalize common aliases (e.g.,
maybe?→maybe,not-now→not_now,closed→done) - OR multiple
column_keystogether while keeping other filters combined with AND - Include column selections in filter summaries
- Normalize saved-filter parameters to ensure aliased and reordered
column_keysresolve to equivalent filters - Document the new API parameter and behavior
- Add comprehensive test coverage for model and controller behavior
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
app/models/filter/fields.rb |
Added COLUMN_KEY_ALIASES mapping and normalize_column_key() class method; added column_keys store accessor with getter/setter for normalization |
app/models/filter/params.rb |
Extended PERMITTED_PARAMS to include column_keys; added normalize_param() to handle column key normalization with sorting/deduplication for filter equivalence |
app/models/filter.rb |
Added filter_by_column_keys() method to handle ORing of column key filters; updated include_closed_cards?() and include_not_now_cards?() to account for column key filters |
app/models/filter/summarized.rb |
Added SPECIAL_COLUMN_NAMES mapping and column_summary() method; added workflow_column_names_by_id() to fetch column names for display in filter summaries |
docs/API.md |
Documented new column_keys[] query parameter with supported values and examples |
test/models/filter_test.rb |
Added tests for column key filtering, normalization, aliasing, and filter equivalence |
test/controllers/cards_controller_test.rb |
Added integration tests for JSON API column key filtering |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
acd6ed4 to
66ed6ea
Compare
flavorjones
reviewed
Apr 8, 2026
66ed6ea to
5a3dcbe
Compare
5a3dcbe to
64cfa6a
Compare
f10f670 to
2a42280
Compare
2a42280 to
3c5bfa3
Compare
3c5bfa3 to
1066622
Compare
flavorjones
approved these changes
Apr 14, 2026
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.
Summary
This adds
column_ids[]filtering toGET /:account_slug/cardsso API clients can ask the cards endpoint for cards in one or more workflow columns.What wasn't possible before
Before this change, clients could:
GET /:account_slug/cardsand filter by board, tag, assignee, creator, search terms, etc.GET /:account_slug/boards/:board_id/columns/:column_id/cardsBut they could not ask the global cards endpoint for cards in specific workflow columns.
That meant clients wanting workflow-column filtering through
/cardshad to either:/cardsresult set and filter bycolumn_idclient-side, or/cardsfiltering interface.What this PR adds
column_ids[]onGET /:account_slug/cardscolumn_ids[]when building the cards queryExamples
GET /:account_slug/cards?column_ids[]=03f...GET /:account_slug/cards?board_ids[]=...&column_ids[]=03f...GET /:account_slug/cards?column_ids[]=03f...&column_ids[]=03g...