You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Atlassian Cloud JIRA查询异常:仅展示In Progress状态的活跃Sprint问题

JIRA Cloud 查询结果异常:活跃Sprint非In Progress工单被过滤

环境

Atlassian Cloud JIRA Instance

原始JQL查询

project in ( Team1, Team2, Team3 ) and issuetype in (Story, Task) 
and ((sprint in openSprints() AND resolved = empty) OR resolved >= 2024-01-01)

预期目标

拉取两类工单:

  • 活跃Sprint里所有未解决的Story/Task(无论当前是Testing还是其他活跃状态)
  • 2024年1月1日之后完成的所有Story/Task

实际问题

单独执行两个分支查询(活跃Sprint未解决 / 2024年后已解决)结果均正常,但组合后,活跃Sprint里仅显示“In Progress”状态的工单,Testing等其他未解决状态的工单全部被过滤。尝试过嵌套过滤器、手动指定状态,问题依旧。

修复方案

这种情况大概率是JIRA对resolved = empty的解析存在隐含状态关联,或是逻辑分组优先级导致的解析歧义,试试以下两种改法:

方法1:明确指定未解决状态(替代resolved = empty)

直接将resolved = empty替换为具体的未解决状态列表,避免JIRA自动关联过滤:

project in ( Team1, Team2, Team3 ) and issuetype in (Story, Task) 
and ((sprint in openSprints() AND status in ("In Progress", "Testing", "待办")) OR resolved >= 2024-01-01)

注意:将示例中的状态名称替换为你JIRA实例中实际的未解决状态

方法2:调整逻辑分组,规范字段写法

给两个分支添加清晰的分组,同时将resolved = empty替换为JQL官方推荐的resolved is empty写法:

project in ( Team1, Team2, Team3 ) and issuetype in (Story, Task) 
and (
  (sprint in openSprints() AND resolved is empty) 
  OR 
  (resolved >= '2024-01-01')
)

若不需要包含活跃Sprint内2024年1月1日后解决的工单,可在第二个分支追加sprint not in openSprints()

验证步骤

修改后分别确认:

  • 活跃Sprint中的Testing等未解决状态工单是否正常显示
  • 2024年1月1日后解决的工单是否全部被拉取

内容的提问来源于stack exchange,提问作者user27738020

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 12:10:14