Adds REST API for versions (#7403).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6180 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-07-04 19:34:58 +00:00
parent daa426167f
commit b86a748b1d
8 changed files with 249 additions and 46 deletions
+18
View File
@@ -0,0 +1,18 @@
api.array :versions, api_meta(:total_count => @versions.size) do
@versions.each do |version|
api.version do
api.id version.id
api.project(:id => version.project_id, :name => version.project.name) unless version.project.nil?
api.name version.name
api.description version.description
api.status version.status
api.due_date version.effective_date
render_api_custom_values version.custom_field_values, api
api.created_on version.created_on
api.updated_on version.updated_on
end
end
end