I am trying to create a query that will be used to drive what issues appear in the plans view for some stakeholders.
We have some issues already committed to and this view needs to focus on future work that has not been assigned to those sprints.
I thought this would be easy enough. Just query what sprints we want to exclude for stories. Weirdly, the query is not returning some issues that have never been in a sprint before (their history confirms this).
Original Query:
> ( project in (MRIPROJ) and status not in (Done, Closed) and sprint not in (7051, 7052, 7053, 7739)) or (project = MRIPROJ and issuetype in (Initiative, Epic) and status not in (Done, Closed))
This resolves some issues I would expect it to return, but not all.
Several such issues missing from the data set are stories without any past sprint assignment, and are not in any active or future sprint.
To be sure I was not missing them with mk 1 eyeball, I changed the query to return just that one and found even more odd results.
> ( project in (MRIPROJ, RRM, "Enterprise Secure File Transfer") and status not in (Done, Closed) and sprint NOT IN openSprints() and issuekey = MRIPROJ-3661)
This returns no issues. Which is weird since it is a story in the backlog.
So one would expect that maybe I am somehow wrong and the issues was assigned to an open sprint. If you inverse that part of the query, it also returns no results.
> ( project in (MRIPROJ, RRM, "Enterprise Secure File Transfer") and status not in (Done, Closed) and sprint IN openSprints() and issuekey = MRIPROJ-3661)
I am perplexed how queries for both the issue inside any open sprint or not in any open sprint would both return no results.
To be sure I was not crazy, I removed the sprint portion all together. Returned the issue in the issuekey.
So obviously the sprint portion is excluding it somehow, but the history shows no sprints and the sprint field on the issue shows no sprint assigned. It is empty.
What am I missing here that would cause this?