Feature #7180
closedList of statuses in REST API
Added by Mark Kofman over 13 years ago. Updated over 12 years ago.
50%
Description
Now it is impossible to get the list of all available statuses through Rest API.
Related issues
Updated by Alex Last over 13 years ago
- Assignee set to Jean-Philippe Lang
Jean-Philippe, I hope you don't mind that I'm assigning this request to you. Maybe you could find some time to implement this in 1.1.0.
Updated by Rodrigo Recio over 13 years ago
I've made a pull request on edavis10's github (my github is rrecio) of a code that expose issue_statuses through REST (I did for trackers too), can anyone do something about this?
Updated by milki milk over 13 years ago
I believe I have a better patch than rrecio:
https://github.com/milki/redmine/compare/master...issue-status-api
I've exposed index/show for issue-status - no longer needs admin access
index will list all the statuses
show will allow you to retrieve one either by id or name
I've added 3 tests for each one of them.
Updated by milki milk over 13 years ago
milki milk wrote:
I've exposed index/show for issue-status - no longer needs admin access
I should clarify this. Index is only exposed via api for everyone. Only admin can access the web interface still.
Show only exposes an api interface since its not useful otherwise.
Updated by milki milk over 13 years ago
I submitted a pull request:
Updated by Ewan Makepeace over 13 years ago
+1
This is a bit of a showstopper for my friend's iPhone App RedminPro: http://itunes.apple.com/us/app/redminepro/id415596033?mt=8
I can use it to reject my developers work, but as soon as I find an issue that is completed I am stuck - he is only able to populate the status menu with options seen in the list of issues I pull - and since I only get open issues, he never sees a Closed status, and so it is not on the menu...
Clearly populating menus with the values seen in a small sample of records is no way to be writing a UI but until REST provides enumeration of Status (and other fields) all developers of plugins and desktop software will be similarly stuck.
Updated by milki milk over 13 years ago
I guess this should be moved to patches instead of feature. Maybe patches are actually seen by developers? Is it stands, the assignee seems too busy or doesn't care about the REST API.
Updated by Bevan Rudge about 13 years ago
- % Done changed from 0 to 50
Updated by Jean-Philippe Lang about 13 years ago
Ewan Makepeace wrote:
Clearly populating menus with the values seen in a small sample of records is no way to be writing a UI but until REST provides enumeration of Status (and other fields) all developers of plugins and desktop software will be similarly stuck.
Populating the menu with all existing statuses that /issue_statues
would return is (maybe slightly better but) not the right solution. All statuses are not applicable to all issues.
I think the API should offer a way to retrieve the statuses that a particular issue can be changed to by the user. Something like /issues/:id/edit
that would return an xml/json representation of possible statuses and all other properties that can be changed (assignee, priority...).
Updated by Jean-Philippe Lang about 13 years ago
Or maybe a way to include optionnaly all this information in the response to /issues/:id.
Updated by Alex Last about 13 years ago
in some cases I need to retrieve "*what are the available statuses for this issue*",
but sometimes I need to get "*what are all possible statuses in this project*" - that is if I'm building a search form for issues in some application...
Updated by Etienne Massip almost 13 years ago
- Priority changed from Normal to High
- Target version set to Candidate for next major release
REST-blocking for instances which don't set a default Status.
Updated by Rodrigo Recio almost 13 years ago
Why don't you just create a json/xml response for a path like this projects/:project_name/issues/new.json so its response is all current project available trackers and statuses?
Updated by Jean-Philippe Lang over 12 years ago
- Status changed from New to Closed
- Target version changed from Candidate for next major release to 1.3.0
- Resolution set to Fixed
The list of all statuses is now available, see r7878.
Rodrigo Recio wrote:
Why don't you just create a json/xml response for a path like this projects/:project_name/issues/new.json so its response is all current project available trackers and statuses?
Similar to my proposal in note-10. Could you try to design this response so we can get some feedback?