如何从状态为“进行中"的项目中获得问题?使用Redmine REST API [英] How to get issues from a project that have status "in progress" using Redmine REST API
问题描述
我正在尝试使用Redmine REST API从plan.io项目中获取特定问题.我想列出状态为进行中"或估计"的项目中的问题.但是我不确定要编写哪种查询字符串.我在redmine网站上的API文档中找不到任何内容.
I am trying to get specific issues from a plan.io project using the Redmine REST API. I want to list issues from a project that have the status of "in progress" or "to estimate". But I am not sure what kind of query string to write. I cant find any thing in API documentation on the redmine site.
这是从项目中获取所有问题的方法.
Here is how to get all the issues from a project.
http://someurl.com/issues.json?key=185f14564g65f4g65df4g46570a0eb4267&project_id=2
但是如何仅从状态为进行中"或已解决"等的项目中获取问题.我知道如何获取状态的ID,但不确定如何编写查询.这是我尝试过但没有奏效的方法.
But how do I get only the issues from a project that have status equal to "in progress" or "resolved" etc. I know how to get IDs for the statuses but not sure how write the query. This is what I tried but didnt work.
http://someurl.com/issues.json?key=185f14564g65f4g65df4g46570a0eb4267&project_id=2&issue_status_id=2
推荐答案
文档表示有一个 status_id 参数,用于仅列出给定状态ID的问题.示例:
The documentation says there's a status_id parameter for list only issues for a given status id. Example:
http://demo.redmine.org/issues.xml? project_id = 16992& status_id = 2
issue_statuses 服务可以告诉您什么是状态代码
Tthe issue_statuses service can tell you what are the statuses codes
http://demo.redmine.org/issue_statuses.xml
您可以使用以下语法为状态设置多个搜索值:
You can set several search values for status with the following syntax:
我必须承认文档中没有提到它,但我是通过在Web界面中设置过滤器找到它的,然后修改了URL以使用相同的参数调用Web服务.
I have to admit it was not mentioned in the documentation, but I found it by setting the filters in the web interface, and than modify the url to call the webservice with the same parameters.
这篇关于如何从状态为“进行中"的项目中获得问题?使用Redmine REST API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!