To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / issues / index.api.rsb @ 1531:ae8145b28b2b
History | View | Annotate | Download (1.78 KB)
| 1 |
api.array :issues, api_meta(:total_count => @issue_count, :offset => @offset, :limit => @limit) do |
|---|---|
| 2 |
@issues.each do |issue| |
| 3 |
api.issue do |
| 4 |
api.id issue.id |
| 5 |
api.project(:id => issue.project_id, :name => issue.project.name) unless issue.project.nil? |
| 6 |
api.tracker(:id => issue.tracker_id, :name => issue.tracker.name) unless issue.tracker.nil? |
| 7 |
api.status(:id => issue.status_id, :name => issue.status.name) unless issue.status.nil? |
| 8 |
api.priority(:id => issue.priority_id, :name => issue.priority.name) unless issue.priority.nil? |
| 9 |
api.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil? |
| 10 |
api.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil? |
| 11 |
api.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil? |
| 12 |
api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil? |
| 13 |
api.parent(:id => issue.parent_id) unless issue.parent.nil? |
| 14 |
|
| 15 |
api.subject issue.subject |
| 16 |
api.description issue.description |
| 17 |
api.start_date issue.start_date |
| 18 |
api.due_date issue.due_date |
| 19 |
api.done_ratio issue.done_ratio |
| 20 |
api.estimated_hours issue.estimated_hours |
| 21 |
|
| 22 |
render_api_custom_values issue.visible_custom_field_values, api |
| 23 |
|
| 24 |
api.created_on issue.created_on |
| 25 |
api.updated_on issue.updated_on |
| 26 |
api.closed_on issue.closed_on |
| 27 |
|
| 28 |
api.array :relations do |
| 29 |
issue.relations.each do |relation| |
| 30 |
api.relation(:id => relation.id, :issue_id => relation.issue_from_id, :issue_to_id => relation.issue_to_id, :relation_type => relation.relation_type, :delay => relation.delay) |
| 31 |
end |
| 32 |
end if include_in_api_response?('relations')
|
| 33 |
end |
| 34 |
end |
| 35 |
end |