From e8e7498b3b6c23d06c6a077f25f3fcfac0a3e2be Mon Sep 17 00:00:00 2001 From: Yoan Wainmann Date: Wed, 25 Mar 2026 17:34:19 +0200 Subject: [PATCH] fix: --show-all-issues should preserve user JQL filter When using --show-all-issues with jira sprint list, the flag now preserves any user-specified JQL filter by combining it with "project IS NOT EMPTY" using AND, rather than replacing it. Closes #969 --- internal/cmd/sprint/list/list.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/internal/cmd/sprint/list/list.go b/internal/cmd/sprint/list/list.go index ac3098f9..5869311d 100644 --- a/internal/cmd/sprint/list/list.go +++ b/internal/cmd/sprint/list/list.go @@ -102,7 +102,11 @@ func singleSprintView(sprintQuery *query.Sprint, flags query.FlagParser, boardID return nil, err } if sprintQuery.Params().ShowAllIssues { - q.Params().JQL = "project IS NOT EMPTY" + if q.Params().JQL != "" { + q.Params().JQL = "project IS NOT EMPTY AND " + q.Params().JQL + } else { + q.Params().JQL = "project IS NOT EMPTY" + } } resp, err := client.SprintIssues(sprintID, q.Get(), q.Params().From, q.Params().Limit) if err != nil { @@ -271,7 +275,11 @@ func getIssueQuery(project string, flags query.FlagParser, showAll bool) (string return "", err } if showAll { - q.Params().JQL = "project IS NOT EMPTY" + if q.Params().JQL != "" { + q.Params().JQL = "project IS NOT EMPTY AND " + q.Params().JQL + } else { + q.Params().JQL = "project IS NOT EMPTY" + } } return q.Get(), nil }