annotate .svn/pristine/0d/0d422b89acdac2bb8c5929f11e22f0904e9f370b.svn-base @ 1524:82fac3dcf466 redmine-2.5-integration

Fix failure to interpret Javascript when autocompleting members for project
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 11 Sep 2014 10:24:38 +0100
parents 261b3d9a4903
children
rev   line source
Chris@1464 1 api.issue do
Chris@1464 2 api.id @issue.id
Chris@1464 3 api.project(:id => @issue.project_id, :name => @issue.project.name) unless @issue.project.nil?
Chris@1464 4 api.tracker(:id => @issue.tracker_id, :name => @issue.tracker.name) unless @issue.tracker.nil?
Chris@1464 5 api.status(:id => @issue.status_id, :name => @issue.status.name) unless @issue.status.nil?
Chris@1464 6 api.priority(:id => @issue.priority_id, :name => @issue.priority.name) unless @issue.priority.nil?
Chris@1464 7 api.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil?
Chris@1464 8 api.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil?
Chris@1464 9 api.category(:id => @issue.category_id, :name => @issue.category.name) unless @issue.category.nil?
Chris@1464 10 api.fixed_version(:id => @issue.fixed_version_id, :name => @issue.fixed_version.name) unless @issue.fixed_version.nil?
Chris@1464 11 api.parent(:id => @issue.parent_id) unless @issue.parent.nil?
Chris@1464 12
Chris@1464 13 api.subject @issue.subject
Chris@1464 14 api.description @issue.description
Chris@1464 15 api.start_date @issue.start_date
Chris@1464 16 api.due_date @issue.due_date
Chris@1464 17 api.done_ratio @issue.done_ratio
Chris@1464 18 api.estimated_hours @issue.estimated_hours
Chris@1464 19 api.spent_hours(@issue.spent_hours) if User.current.allowed_to?(:view_time_entries, @project)
Chris@1464 20
Chris@1464 21 render_api_custom_values @issue.visible_custom_field_values, api
Chris@1464 22
Chris@1464 23 api.created_on @issue.created_on
Chris@1464 24 api.updated_on @issue.updated_on
Chris@1464 25 api.closed_on @issue.closed_on
Chris@1464 26
Chris@1464 27 render_api_issue_children(@issue, api) if include_in_api_response?('children')
Chris@1464 28
Chris@1464 29 api.array :attachments do
Chris@1464 30 @issue.attachments.each do |attachment|
Chris@1464 31 render_api_attachment(attachment, api)
Chris@1464 32 end
Chris@1464 33 end if include_in_api_response?('attachments')
Chris@1464 34
Chris@1464 35 api.array :relations do
Chris@1464 36 @relations.each do |relation|
Chris@1464 37 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)
Chris@1464 38 end
Chris@1464 39 end if include_in_api_response?('relations') && @relations.present?
Chris@1464 40
Chris@1464 41 api.array :changesets do
Chris@1464 42 @issue.changesets.each do |changeset|
Chris@1464 43 api.changeset :revision => changeset.revision do
Chris@1464 44 api.user(:id => changeset.user_id, :name => changeset.user.name) unless changeset.user.nil?
Chris@1464 45 api.comments changeset.comments
Chris@1464 46 api.committed_on changeset.committed_on
Chris@1464 47 end
Chris@1464 48 end
Chris@1464 49 end if include_in_api_response?('changesets') && User.current.allowed_to?(:view_changesets, @project)
Chris@1464 50
Chris@1464 51 api.array :journals do
Chris@1464 52 @journals.each do |journal|
Chris@1464 53 api.journal :id => journal.id do
Chris@1464 54 api.user(:id => journal.user_id, :name => journal.user.name) unless journal.user.nil?
Chris@1464 55 api.notes journal.notes
Chris@1464 56 api.created_on journal.created_on
Chris@1464 57 api.array :details do
Chris@1464 58 journal.visible_details.each do |detail|
Chris@1464 59 api.detail :property => detail.property, :name => detail.prop_key do
Chris@1464 60 api.old_value detail.old_value
Chris@1464 61 api.new_value detail.value
Chris@1464 62 end
Chris@1464 63 end
Chris@1464 64 end
Chris@1464 65 end
Chris@1464 66 end
Chris@1464 67 end if include_in_api_response?('journals')
Chris@1464 68
Chris@1464 69 api.array :watchers do
Chris@1464 70 @issue.watcher_users.each do |user|
Chris@1464 71 api.user :id => user.id, :name => user.name
Chris@1464 72 end
Chris@1464 73 end if include_in_api_response?('watchers') && User.current.allowed_to?(:view_issue_watchers, @issue.project)
Chris@1464 74 end