Fixes indentation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4487 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5f57bceabb
commit
f2b42237d0
|
@ -1,15 +1,15 @@
|
|||
api.array :issues do
|
||||
@issues.each do |issue|
|
||||
api.issue do
|
||||
api.id issue.id
|
||||
api.project(:id => issue.project_id, :name => issue.project.name) unless issue.project.nil?
|
||||
api.tracker(:id => issue.tracker_id, :name => issue.tracker.name) unless issue.tracker.nil?
|
||||
api.status(:id => issue.status_id, :name => issue.status.name) unless issue.status.nil?
|
||||
api.priority(:id => issue.priority_id, :name => issue.priority.name) unless issue.priority.nil?
|
||||
api.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil?
|
||||
api.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil?
|
||||
api.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil?
|
||||
api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil?
|
||||
api.issue do
|
||||
api.id issue.id
|
||||
api.project(:id => issue.project_id, :name => issue.project.name) unless issue.project.nil?
|
||||
api.tracker(:id => issue.tracker_id, :name => issue.tracker.name) unless issue.tracker.nil?
|
||||
api.status(:id => issue.status_id, :name => issue.status.name) unless issue.status.nil?
|
||||
api.priority(:id => issue.priority_id, :name => issue.priority.name) unless issue.priority.nil?
|
||||
api.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil?
|
||||
api.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil?
|
||||
api.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil?
|
||||
api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil?
|
||||
api.parent(:id => issue.parent_id) unless issue.parent.nil?
|
||||
|
||||
api.subject issue.subject
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
api.issue do
|
||||
api.id @issue.id
|
||||
api.project(:id => @issue.project_id, :name => @issue.project.name) unless @issue.project.nil?
|
||||
api.tracker(:id => @issue.tracker_id, :name => @issue.tracker.name) unless @issue.tracker.nil?
|
||||
api.status(:id => @issue.status_id, :name => @issue.status.name) unless @issue.status.nil?
|
||||
api.priority(:id => @issue.priority_id, :name => @issue.priority.name) unless @issue.priority.nil?
|
||||
api.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil?
|
||||
api.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil?
|
||||
api.id @issue.id
|
||||
api.project(:id => @issue.project_id, :name => @issue.project.name) unless @issue.project.nil?
|
||||
api.tracker(:id => @issue.tracker_id, :name => @issue.tracker.name) unless @issue.tracker.nil?
|
||||
api.status(:id => @issue.status_id, :name => @issue.status.name) unless @issue.status.nil?
|
||||
api.priority(:id => @issue.priority_id, :name => @issue.priority.name) unless @issue.priority.nil?
|
||||
api.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil?
|
||||
api.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil?
|
||||
api.category(:id => @issue.category_id, :name => @issue.category.name) unless @issue.category.nil?
|
||||
api.fixed_version(:id => @issue.fixed_version_id, :name => @issue.fixed_version.name) unless @issue.fixed_version.nil?
|
||||
api.parent(:id => @issue.parent_id) unless @issue.parent.nil?
|
||||
|
||||
api.subject @issue.subject
|
||||
api.subject @issue.subject
|
||||
api.description @issue.description
|
||||
api.start_date @issue.start_date
|
||||
api.due_date @issue.due_date
|
||||
api.done_ratio @issue.done_ratio
|
||||
api.start_date @issue.start_date
|
||||
api.due_date @issue.due_date
|
||||
api.done_ratio @issue.done_ratio
|
||||
api.estimated_hours @issue.estimated_hours
|
||||
if User.current.allowed_to?(:view_time_entries, @project)
|
||||
api.spent_hours @issue.spent_hours
|
||||
end
|
||||
api.spent_hours(@issue.spent_hours) if User.current.allowed_to?(:view_time_entries, @project)
|
||||
|
||||
render_api_custom_values @issue.custom_field_values, api
|
||||
|
||||
|
@ -28,35 +26,35 @@ api.issue do
|
|||
render_api_issue_children(@issue, api) if include_in_api_response?('children')
|
||||
|
||||
api.array :relations do
|
||||
@issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation|
|
||||
api.relation(:id => relation.id, :issue_id => relation.other_issue(@issue).id, :relation_type => relation.relation_type_for(@issue), :delay => relation.delay)
|
||||
end
|
||||
@issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation|
|
||||
api.relation(:id => relation.id, :issue_id => relation.other_issue(@issue).id, :relation_type => relation.relation_type_for(@issue), :delay => relation.delay)
|
||||
end
|
||||
end if include_in_api_response?('relations')
|
||||
|
||||
api.array :changesets do
|
||||
@issue.changesets.each do |changeset|
|
||||
api.changeset :revision => changeset.revision do
|
||||
api.user(:id => changeset.user_id, :name => changeset.user.name) unless changeset.user.nil?
|
||||
api.comments changeset.comments
|
||||
api.committed_on changeset.committed_on
|
||||
end
|
||||
end
|
||||
@issue.changesets.each do |changeset|
|
||||
api.changeset :revision => changeset.revision do
|
||||
api.user(:id => changeset.user_id, :name => changeset.user.name) unless changeset.user.nil?
|
||||
api.comments changeset.comments
|
||||
api.committed_on changeset.committed_on
|
||||
end
|
||||
end
|
||||
end if include_in_api_response?('changesets') && User.current.allowed_to?(:view_changesets, @project)
|
||||
|
||||
api.array :journals do
|
||||
@issue.journals.each do |journal|
|
||||
api.journal :id => journal.id do
|
||||
api.user(:id => journal.user_id, :name => journal.user.name) unless journal.user.nil?
|
||||
api.notes journal.notes
|
||||
api.array :details do
|
||||
journal.details.each do |detail|
|
||||
api.detail :property => detail.property, :name => detail.prop_key do
|
||||
api.old_value detail.old_value
|
||||
api.new_value detail.value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@issue.journals.each do |journal|
|
||||
api.journal :id => journal.id do
|
||||
api.user(:id => journal.user_id, :name => journal.user.name) unless journal.user.nil?
|
||||
api.notes journal.notes
|
||||
api.array :details do
|
||||
journal.details.each do |detail|
|
||||
api.detail :property => detail.property, :name => detail.prop_key do
|
||||
api.old_value detail.old_value
|
||||
api.new_value detail.value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end if include_in_api_response?('journals')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue