且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Klipfolio中的JIRA查询语言来查询JIRA API所拒绝的问题数量

更新时间:2022-02-06 21:15:05

  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&lt ; = {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