Repository navigation
Cannot filter for issues with 'Done' (completed) status: issues list --status Done always returns zero results #179
Description
What happened?
When using the status filter (e.g., --status Done) with the CLI command linearis issues list, the command returns zero results even though there are issues in that status. There is no error or warning, and the same issue in other statuses works as expected.
Root cause / code analysis
The implementation always applies an implicit filter excluding issues with status type 'completed', even when the user passes an explicit status filter, which causes logical contradiction and zero results.
Current code (src/services/issue-service.ts):
const NON_COMPLETED_ISSUES_FILTER: IssueFilter = {
state: { type: { neq: "completed" } },
};
function buildListIssuesFilter(filter: IssueFilter): IssueFilter {
return {
and: [NON_COMPLETED_ISSUES_FILTER, filter],
};
}So when a user runs:
linearis issues list --team ADV --status DoneThe resulting filter is (pseudocode):
{
and: [
{ state: { type: { neq: "completed" } } },
{ state: { id: { in: ["<done-status-id>"] } } }
]
}If the "Done" status has type: "completed", this filter always excludes it, so no issues return.
Proposed fix
Only apply the implicit "not completed" filter if the user did NOT supply any explicit status filter:
function buildListIssuesFilter(filter: IssueFilter): IssueFilter {
if (filter.state) return filter; // let user be explicit
return {
and: [NON_COMPLETED_ISSUES_FILTER, filter],
};
}This would let users actually retrieve issues in a completed state using the status filter. The current behavior is not documented but is a significant principle-of-least-surprise violation.
Expected behavior
I expect to be able to filter issues by any status, including ones that are 'completed.' When I filter with --status Done (or other completed type), all issues in that status should appear in the results, just like any other status.
Steps to reproduce
1. Change at least one issue to the 'Done' status for a team
2. Run: `linearis issues list --team <TEAM_NAME> --status Done`
3. Observe zero results, even though there are issues in that status
4. Run: `linearis issues list --team <TEAM_NAME>`
5. Notice that issues in 'Done' status do not appear, but issues in other statuses do.Actual output
No error message. The JSON result has an empty nodes array. For example:
{
"nodes": [],
"pageInfo": {
"hasNextPage": false,
"endCursor": null
}
}Linearis version
2026.4.8
Node.js version
v25.8.2
Operating system
macOS
Authentication method
No response
Additional context
Advanced troubleshooting reveals that the CLI implementation always applies an implicit filter excluding issues with status type 'completed' (see NON_COMPLETED_ISSUES_FILTER in the code). This silent filter remains even when an explicit status filter is used, which creates a logical contradiction and results in zero results for completed statuses like 'Done'.
This behavior is not documented anywhere, and it's not possible to retrieve completed issues using the CLI. Either the implicit filter should be removed when an explicit status is provided, or the documentation/process should be updated so this is clear to users.
Related files:
src/services/issue-service.ts(where NON_COMPLETED_ISSUES_FILTER and buildListIssuesFilter are defined)- No mention in documentation or CLI reference of this implicit filter.
Activity
linear commentedon Apr 24, 2026
LIN-132
chore(release): 2026.4.9-next.1 [skip ci]
iamfj commentedon Apr 24, 2026
Hey @ryanrozich! Thanks for reporting this — and for the detailed analysis. You were right about the contradiction.
We’ve now implemented a fix in PR #180
What changed
Could you verify on the pre-release?
When you have a moment, could you please test this in the pre-release (see here how to install the pre-release channel) build from #180 and confirm whether your case now works (
issues list --team <TEAM> --status Done)?If it still fails, please share:
Also, while we expected this behavior to be the most intuitive interface, this issue is a good signal that the current UX may still be confusing. If you have ideas for making this command behavior clearer or more intuitive, we’d really value your suggestions.
Thanks again for the high-quality report.
ryanrozich commentedon Apr 26, 2026
Absolutely @iamfj! Thanks for fixing it, I just verified using the pre-release and it works. Nice job
chore(release): 2026.4.9 [skip ci]