@@ -1,31 +1,32 | |||
|
1 | 1 | xml.instruct! |
|
2 | 2 | xml.issues :type => 'array', :count => @issue_count do |
|
3 | 3 | @issues.each do |issue| |
|
4 |
|
|
|
4 | xml.issue do | |
|
5 | xml.id issue.id | |
|
5 | 6 | xml.project(:id => issue.project_id, :name => issue.project.name) unless issue.project.nil? |
|
6 | 7 | xml.tracker(:id => issue.tracker_id, :name => issue.tracker.name) unless issue.tracker.nil? |
|
7 | 8 | xml.status(:id => issue.status_id, :name => issue.status.name) unless issue.status.nil? |
|
8 | 9 | xml.priority(:id => issue.priority_id, :name => issue.priority.name) unless issue.priority.nil? |
|
9 | 10 | xml.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil? |
|
10 | 11 | xml.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil? |
|
11 | 12 | xml.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil? |
|
12 | 13 | xml.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil? |
|
13 | 14 | |
|
14 | 15 | xml.subject issue.subject |
|
15 | 16 | xml.description issue.description |
|
16 | 17 | xml.start_date issue.start_date |
|
17 | 18 | xml.due_date issue.due_date |
|
18 | 19 | xml.done_ratio issue.done_ratio |
|
19 | 20 | xml.estimated_hours issue.estimated_hours |
|
20 | 21 | |
|
21 | 22 | xml.custom_fields do |
|
22 | 23 | issue.custom_field_values.each do |custom_value| |
|
23 | 24 | xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name |
|
24 | 25 | end |
|
25 | 26 | end |
|
26 | 27 | |
|
27 | 28 | xml.created_on issue.created_on |
|
28 | 29 | xml.updated_on issue.updated_on |
|
29 | 30 | end |
|
30 | 31 | end |
|
31 | 32 | end |
@@ -1,54 +1,55 | |||
|
1 | 1 | xml.instruct! |
|
2 | xml.issue :id => @issue.id do | |
|
2 | xml.issue do | |
|
3 | xml.id @issue.id | |
|
3 | 4 | xml.project(:id => @issue.project_id, :name => @issue.project.name) unless @issue.project.nil? |
|
4 | 5 | xml.tracker(:id => @issue.tracker_id, :name => @issue.tracker.name) unless @issue.tracker.nil? |
|
5 | 6 | xml.status(:id => @issue.status_id, :name => @issue.status.name) unless @issue.status.nil? |
|
6 | 7 | xml.priority(:id => @issue.priority_id, :name => @issue.priority.name) unless @issue.priority.nil? |
|
7 | 8 | xml.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil? |
|
8 | 9 | xml.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil? |
|
9 | 10 | xml.category(:id => @issue.category_id, :name => @issue.category.name) unless @issue.category.nil? |
|
10 | 11 | xml.fixed_version(:id => @issue.fixed_version_id, :name => @issue.fixed_version.name) unless @issue.fixed_version.nil? |
|
11 | 12 | |
|
12 | 13 | xml.subject @issue.subject |
|
13 | 14 | xml.description @issue.description |
|
14 | 15 | xml.start_date @issue.start_date |
|
15 | 16 | xml.due_date @issue.due_date |
|
16 | 17 | xml.done_ratio @issue.done_ratio |
|
17 | 18 | xml.estimated_hours @issue.estimated_hours |
|
18 | 19 | if User.current.allowed_to?(:view_time_entries, @project) |
|
19 | 20 | xml.spent_hours @issue.spent_hours |
|
20 | 21 | end |
|
21 | 22 | |
|
22 | 23 | xml.custom_fields do |
|
23 | 24 | @issue.custom_field_values.each do |custom_value| |
|
24 | 25 | xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name |
|
25 | 26 | end |
|
26 | 27 | end unless @issue.custom_field_values.empty? |
|
27 | 28 | |
|
28 | 29 | xml.created_on @issue.created_on |
|
29 | 30 | xml.updated_on @issue.updated_on |
|
30 | 31 | |
|
31 | 32 | xml.changesets do |
|
32 | 33 | @issue.changesets.each do |changeset| |
|
33 | 34 | xml.changeset :revision => changeset.revision do |
|
34 | 35 | xml.user(:id => changeset.user_id, :name => changeset.user.name) unless changeset.user.nil? |
|
35 | 36 | xml.comments changeset.comments |
|
36 | 37 | xml.committed_on changeset.committed_on |
|
37 | 38 | end |
|
38 | 39 | end |
|
39 | 40 | end if User.current.allowed_to?(:view_changesets, @project) && @issue.changesets.any? |
|
40 | 41 | |
|
41 | 42 | xml.journals do |
|
42 | 43 | @issue.journals.each do |journal| |
|
43 | 44 | xml.journal :id => journal.id do |
|
44 | 45 | xml.user(:id => journal.user_id, :name => journal.user.name) unless journal.user.nil? |
|
45 | 46 | xml.notes journal.notes |
|
46 | 47 | xml.details do |
|
47 | 48 | journal.details.each do |detail| |
|
48 | 49 | xml.detail :property => detail.property, :name => detail.prop_key, :old => detail.old_value, :new => detail.value |
|
49 | 50 | end |
|
50 | 51 | end |
|
51 | 52 | end |
|
52 | 53 | end |
|
53 | 54 | end unless @issue.journals.empty? |
|
54 | 55 | end |
@@ -1,18 +1,19 | |||
|
1 | 1 | xml.instruct! |
|
2 | 2 | xml.projects :type => 'array' do |
|
3 | 3 | @projects.each do |project| |
|
4 |
xml.project |
|
|
4 | xml.project do | |
|
5 | xml.id project.id | |
|
5 | 6 | xml.name project.name |
|
6 | 7 | xml.identifier project.identifier |
|
7 | 8 | xml.description project.description |
|
8 | 9 | xml.parent(:id => project.parent_id, :name => project.parent.name) unless project.parent.nil? |
|
9 | 10 | xml.custom_fields do |
|
10 | 11 | project.custom_field_values.each do |custom_value| |
|
11 | 12 | xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name |
|
12 | 13 | end |
|
13 | 14 | end unless project.custom_field_values.empty? |
|
14 | 15 | xml.created_on project.created_on |
|
15 | 16 | xml.updated_on project.updated_on |
|
16 | 17 | end |
|
17 | 18 | end |
|
18 | 19 | end |
@@ -1,16 +1,17 | |||
|
1 | 1 | xml.instruct! |
|
2 | xml.project :id => @project.id do | |
|
2 | xml.project do | |
|
3 | xml.id @project.id | |
|
3 | 4 | xml.name @project.name |
|
4 | 5 | xml.identifier @project.identifier |
|
5 | 6 | xml.description @project.description |
|
6 | 7 | xml.homepage @project.homepage |
|
7 | 8 | |
|
8 | 9 | xml.custom_fields do |
|
9 | 10 | @project.custom_field_values.each do |custom_value| |
|
10 | 11 | xml.custom_field custom_value.value, :id => custom_value.custom_field_id, :name => custom_value.custom_field.name |
|
11 | 12 | end |
|
12 | 13 | end unless @project.custom_field_values.empty? |
|
13 | 14 | |
|
14 | 15 | xml.created_on @project.created_on |
|
15 | 16 | xml.updated_on @project.updated_on |
|
16 | 17 | end |
General Comments 0
You need to be logged in to leave comments.
Login now