Feature #19828
closed
Rest API for projects - filter on project status.
Added by Ryan Eberly over 9 years ago.
Updated over 5 years ago.
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.
Rest_Projects
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
- Description updated (diff)
- Status changed from New to Closed
- Resolution set to Duplicate
Closing as a duplicate of #12921.
- Is duplicate of Feature #12921: REST-API: filter projects by status added
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.
Seiei Miyagi wrote:
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.
Hi Seiei,
Thank you for the review.
I am glad to know it.
I will attach the second patch.
Also available in: Atom
PDF