使用Klipfolio中的JIRA查询语言来查询JIRA API所拒绝的问题数量 [英] Using JIRA Query Language from Klipfolio To Query JIRA API For Number of Rejected Issues

查看:162
本文介绍了使用Klipfolio中的JIRA查询语言来查询JIRA API所拒绝的问题数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Klipfolio查询JIRA API,以返回给定月份其状态为已拒绝"的所有问题,以及每个问题的状态为已拒绝"的次数.

I am trying to query the JIRA API from Klipfolio, to return all issues whos status = "rejected" in a given month, and the number of times each issue's status = "rejected".

我已运行的示例查询:

  1. 请给我给定问题的历史记录,其中包含被拒绝的问题.但我不知道如何从此查询返回问题状态为已拒绝"的次数:

  1. Give me the issue history for a given issue which contains rejected issues. But I don't know how to return the number of times the issue's status = "rejected" from this query:

https://upvate.atlassian.net/rest/api/2/project/UC?expand = changelog .

请问给定项目和冲刺状态为已拒绝"的问题的数量:

Give me the the number of issues whos status = "rejected" for a given project and sprint:

> https://upvate.atlassian.net/rest/api/2/search?jql = project = "UC"和sprint ="21"和status =已拒绝"

https://upvate.atlassian.net/rest/api/2/search?jql=project="UC" and sprint="21" and status="rejected"

但是我需要在给定月份中所有状态为已拒绝"的问题,以及每个问题的状态为已拒绝"的次数.

But I need all issues whos status = "rejected" in a given month, and the number of times each issue's status = "rejected".

推荐答案

  1. 要确定哪些问题已被拒绝,您将需要构造一个JQL语句并将其插入查询中.如果要查看已被拒绝的任何问题的变更日志,查询将如下所示:

  1. To determine which issues have been rejected, you will need to construct a JQL statement and insert that into the query. If you want to see the changelog for any issue that has been rejected, the query will look like this:

> https://upvate.atlassian.net/rest/api/2/search?jql = project = 'UC'和status ='rejected'& expand = changelog& maxResults = 100

https://upvate.atlassian.net/rest/api/2/search?jql=project='UC' and status = 'rejected'&expand=changelog&maxResults=100

expand = changelog将向每个问题对象添加一个JSON数组,其中包含对该问题进行的每次更改的修订历史记录.如果每个呼叫的默认问题数超过默认的50个,则可以使用maxResults参数(maxResults = 100),它将使问题数达到JIRA设置的每个呼叫的最大数目100.将需要使用startAt参数对问题页面进行分页.

The expand=changelog will add a JSON array to each issue object with a revision history of each change made to that issue. In case you have more than the default 50 issues per call, you can use the maxResults parameter (maxResults=100) which will bring the number of issues up to the max per call set by JIRA of 100. If you have more than that you will need to use the startAt parameter to paginate through the pages of issues.

  1. 像上面一样,您将需要创建一个JQL语句并将其插入查询网址中.

  1. Like the above, you will need to create a JQL statement and insert it into the query url.

https://upvate.atlassian.net/rest/api/2/search?jql = project ='UC'和sprint ='21',状态='rejected'并且createdDate> = 2017-12-01 AND createdDate< = 2017-12-31& maxResults = 100

https://upvate.atlassian.net/rest/api/2/search?jql=project = 'UC' and sprint = '21' and status = 'rejected' and createdDate >= 2017-12-01 AND createdDate <= 2017-12-31&maxResults=100

这将成功地从UC项目中返回sprint 21的数据,该数据已在2017年12月内被拒绝并创建.例如,在上个月,您可以使用

This will successfully return data from project UC for sprint 21 that has been rejected and created within the month of December 2017. If you want to filter the data by a relative date range; for example, the previous month, you can utilize Klipfolio's date parameters. To have the above query always return data for the previous month's with the same conditions, the query will look like so:

https://upvate.atlassian.net/rest/api/2/search?jql = project ='UC'和sprint ='21',状态='rejected'并且createdDate> = {date.addMonths(-1).startOfMonth.format()} AND createdDate< ; = {date.addMonths(-1).endOfMonth.format()}& maxResults = 100

https://upvate.atlassian.net/rest/api/2/search?jql=project = 'UC' and sprint = '21' and status = 'rejected' and createdDate >= {date.addMonths(-1).startOfMonth.format()} AND createdDate <= {date.addMonths(-1).endOfMonth.format()}&maxResults=100

这篇关于使用Klipfolio中的JIRA查询语言来查询JIRA API所拒绝的问题数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆