Просмотр исходного кода

Added some fields to GET /time_entries.json

Dmitry Yu Okunev лет назад: 8
Родитель
Сommit
d0e74d542c
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      app/views/timelog/index.api.rsb

+ 3 - 3
app/views/timelog/index.api.rsb

@@ -2,9 +2,9 @@ api.array :time_entries, api_meta(:total_count => @entry_count, :offset => @offs
   @entries.each do |time_entry|
     api.time_entry do
       api.id time_entry.id
-      api.project(:id => time_entry.project_id, :name => time_entry.project.name) unless time_entry.project.nil?
-      api.issue(:id => time_entry.issue_id) unless time_entry.issue.nil?
-      api.user(:id => time_entry.user_id, :name => time_entry.user.name) unless time_entry.user.nil?
+      api.project(:id => time_entry.project_id, :identifier => time_entry.project.identifier, :name => time_entry.project.name) unless time_entry.project.nil?
+      api.issue(:id => time_entry.issue_id, :subject => time_entry.issue.subject) unless time_entry.issue.nil?
+      api.user(:id => time_entry.user_id, :login => time_entry.user.login, :name => time_entry.user.name) unless time_entry.user.nil?
       api.activity(:id => time_entry.activity_id, :name => time_entry.activity.name) unless time_entry.activity.nil?
       api.hours time_entry.hours
       api.comments time_entry.comments