如何查询 Jira 以搜索自创建以来一段时间内已解决的所有问题?

发布于 2024-12-19 09:52:09 字数 301 浏览 8 评论 0原文

例如,假设我需要查找 1 周内解决的所有问题。我需要类似的东西:

已解决 - 创建< '1w'

另一个例子:
假设我有 3 个问题:

1) 2 天前创建,1 天前解决。
2) 5 天前创建,4 天前解决。
3) 3 天前创建,1 天前解决。

我需要一个将返回 1 和 2,但不是 3 的查询。我需要查询在 X 天创建并已解决 <= X+1 天的问题。

For example, let's say I need to find all issues that were resolved within 1 week's time. I need something like:

resolved - created < '1w'

Another example:
Let's say I have 3 issues:

1) created 2 days ago, resolved 1 day ago.
2) created 5 days ago, resolved 4 days ago.
3) created 3 days ago, resolved 1 day ago.

I need a query that will return 1 and 2, but not 3. I need to query for issues that are created at some day X, and resolved <= day X+1.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

王权女流氓 2024-12-26 09:52:09

您可以通过查询进行各种控制。例如,以下是我如何检查过去 5 天内未更新的处于保留状态的票证。

currentUser() AND status = "On Hold" AND updated <= -5d

过去 5 天内创建的内容为:

created >= -5d

过去 7 天内解决的内容为:

resolved >= -7d

resolved >= -1w

You have all sorts of control with queries. For example, here is how I check for my tickets that are on hold that I have not updated in the last 5 days.

currentUser() AND status = "On Hold" AND updated <= -5d

Created in the last 5 days would be:

created >= -5d

Resolved in the last 7 days would be:

resolved >= -7d

OR

resolved >= -1w
心欲静而疯不止 2024-12-26 09:52:09

我不知道这是否重要,但我用 dateCompare() 解决了它:

issueFunction in dateCompare("", "created > resolved -5d"))

I don't know if it matters yet but I resolved it with dateCompare():

issueFunction in dateCompare("", "created > resolved -5d"))
紫瑟鸿黎 2024-12-26 09:52:09

因此,由于默认情况下这似乎并未内置到 JIRA 中,我唯一的其他建议是看看是否可以扩展 JQL 来添加它。

你的Java怎么样?请参阅如何将 JQL 添加到 JIRA< /a>

So since this does not seemed to be built into JIRA by default my only other suggestion is to see if you can extend JQL to add it.

How's your Java? See how to add JQL to JIRA

冰葑 2024-12-26 09:52:09

因此,您希望查看 (解决日期-创建日期) < 的所有问题。 1天
或者2天,或者3天。我想我会创建一个(隐藏)计算自定义字段,显示“已解决创建”并在其上使用“精确数字搜索器”。或者编写一个自定义 JQL 函数来执行相同的操作。在标准 JIRA 中无法做到这一点。

So, you want to see all issues where (Resolved date-Create Date) < 1 day
Or 2 days, or 3 days. I think I'd create a (hidden) calculated custom field that shows Resolved-Created and use an Exact Number Searcher on it. Or maybe write a custom JQL function to do the same thing. No way to do it in standard JIRA.

心房的律动 2024-12-26 09:52:09

这会查找指定时间段内创建当天解决的所有问题:

project = MyProject AND created >= 2021-11-29 AND created < 2021-12-05 AND issueFunction in expression("", "created.clearTime()==resolutionDate.clearTime()") ORDER BY created DESC, updated DESC

其中此部分

created >= 2021-11-29 AND created < 2021-12-05

是您要查找问题的任何时间段,并且

issueFunction in expression("", "created.clearTime()==resolutionDate.clearTime()")

是转换“已创建”和“的日期时间格式”的条件lutionDate”仅转换为日期格式,并将收到的日期相互进行比较。

课题任务:
如果您将 +1 添加到 created.clearTime() - created.clearTime()+1,您将找到所有在创建之日已解决的问题以及已解决的问题第二天就解决了(自创建日期起+1 天)。

请注意,您需要使用插件(我使用的是 ScriptRunner)。

This finds all issues, that were resolved the same day they were created, within the specified period:

project = MyProject AND created >= 2021-11-29 AND created < 2021-12-05 AND issueFunction in expression("", "created.clearTime()==resolutionDate.clearTime()") ORDER BY created DESC, updated DESC

Where this part

created >= 2021-11-29 AND created < 2021-12-05

is any period you're looking for issues within and

issueFunction in expression("", "created.clearTime()==resolutionDate.clearTime()")

is the condition that converts the Date-Time format of "created" and "resolutionDate" to only Date-format and compares the received dates with each other.

The topic's task:
If you add +1 to created.clearTime() - created.clearTime()+1, you will find all issues that were resolved the day they were created and issues that were resolved the next day (+1 day from the creation date).

Note, that you need to use a plugin (I'm using ScriptRunner).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文