如何从状态为“进行中"的项目中获取问题使用 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:
http://demo.redmine.org/issues.xml?f[]=status_id&op[status_id]=%3D&v[status_id][]=2&v[status_id][]=3
我不得不承认文档中没有提到它,但我是通过在 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屋!