Actions
Feature #19828
closedRest API for projects - filter on project status.
Status:
Closed
Priority:
Low
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Duplicate
Description
Our company uses redmine to track projects for a period of time, and then close them. We have a few hundred projects in redmine - most of them closed.
It would be good to be able to return only open projects via the rest API.
For example:
/projects.xml?status=1
or
/projects.json?status=1
Files
Related issues
Updated by Go MAEDA over 8 years ago
- Status changed from New to Closed
- Resolution set to Duplicate
Closing as a duplicate of #12921.
Updated by Go MAEDA over 8 years ago
- Is duplicate of Feature #12921: REST-API: filter projects by status added
Updated by naoki takaesu over 5 years ago
I wrote a patch.
Updated by Seiei Miyagi over 5 years ago
naoki takaesu wrote:
I wrote a patch.
all?
returns true
for []
, so you need to put assert json['projects'].any?
before assert json['projects'].all? {|p| p['status'] == 1}
to confirm filtering projects.Updated by naoki takaesu over 5 years ago
- File 19828-reset-api-filter-on-project-status-v2.diff 19828-reset-api-filter-on-project-status-v2.diff added
Seiei Miyagi wrote:
all?
returnstrue
for[]
, so you need to putassert json['projects'].any?
beforeassert json['projects'].all? {|p| p['status'] == 1}
to confirm filtering projects.
Hi Seiei,
Thank you for the review.
I am glad to know it.
I will attach the second patch.
Actions