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 @ 912:5e80956cc792
History | View | Annotate | Download (1.73 KB)
| 1 | 119:8661b858af72 | Chris | 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 | 909:cbb26bc654de | Chris | |
| 15 | api.subject issue.subject |
||
| 16 | 119:8661b858af72 | Chris | api.description issue.description |
| 17 | 909:cbb26bc654de | Chris | api.start_date issue.start_date |
| 18 | api.due_date issue.due_date |
||
| 19 | api.done_ratio issue.done_ratio |
||
| 20 | 119:8661b858af72 | Chris | api.estimated_hours issue.estimated_hours |
| 21 | 909:cbb26bc654de | Chris | |
| 22 | 119:8661b858af72 | Chris | render_api_custom_values issue.custom_field_values, api |
| 23 | 909:cbb26bc654de | Chris | |
| 24 | 119:8661b858af72 | Chris | api.created_on issue.created_on |
| 25 | api.updated_on issue.updated_on |
||
| 26 | 909:cbb26bc654de | Chris | |
| 27 | api.array :relations do |
||
| 28 | issue.relations.each do |relation| |
||
| 29 | 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) |
||
| 30 | end |
||
| 31 | end if include_in_api_response?('relations')
|
||
| 32 | 119:8661b858af72 | Chris | end |
| 33 | end |
||
| 34 | end |