##// END OF EJS Templates
Rename the Member column to User on the time entries list....
Jean-Philippe Lang -
r10741:d6ecfcf50cfa
parent child
Show More
@@ -11,7 +11,7
11 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
11 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
12 </th>
12 </th>
13 <%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %>
13 <%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %>
14 <%= sort_header_tag('user', :caption => l(:label_member)) %>
14 <%= sort_header_tag('user', :caption => l(:label_user)) %>
15 <%= sort_header_tag('activity', :caption => l(:label_activity)) %>
15 <%= sort_header_tag('activity', :caption => l(:label_activity)) %>
16 <%= sort_header_tag('project', :caption => l(:label_project)) %>
16 <%= sort_header_tag('project', :caption => l(:label_project)) %>
17 <%= sort_header_tag('issue', :caption => l(:label_issue), :default_order => 'desc') %>
17 <%= sort_header_tag('issue', :caption => l(:label_issue), :default_order => 'desc') %>
@@ -110,9 +110,9 module Redmine
110 'category' => {:sql => "#{Issue.table_name}.category_id",
110 'category' => {:sql => "#{Issue.table_name}.category_id",
111 :klass => IssueCategory,
111 :klass => IssueCategory,
112 :label => :field_category},
112 :label => :field_category},
113 'member' => {:sql => "#{TimeEntry.table_name}.user_id",
113 'user' => {:sql => "#{TimeEntry.table_name}.user_id",
114 :klass => User,
114 :klass => User,
115 :label => :label_member},
115 :label => :label_user},
116 'tracker' => {:sql => "#{Issue.table_name}.tracker_id",
116 'tracker' => {:sql => "#{Issue.table_name}.tracker_id",
117 :klass => Tracker,
117 :klass => Tracker,
118 :label => :label_tracker},
118 :label => :label_tracker},
@@ -90,7 +90,7 class TimeEntryReportsControllerTest < ActionController::TestCase
90 end
90 end
91
91
92 def test_report_two_criteria
92 def test_report_two_criteria
93 get :report, :project_id => 1, :columns => 'month', :from => "2007-01-01", :to => "2007-12-31", :criteria => ["member", "activity"]
93 get :report, :project_id => 1, :columns => 'month', :from => "2007-01-01", :to => "2007-12-31", :criteria => ["user", "activity"]
94 assert_response :success
94 assert_response :success
95 assert_template 'report'
95 assert_template 'report'
96 assert_not_nil assigns(:report)
96 assert_not_nil assigns(:report)
@@ -108,7 +108,7 class TimeEntryReportsControllerTest < ActionController::TestCase
108 end
108 end
109
109
110 def test_report_one_day
110 def test_report_one_day
111 get :report, :project_id => 1, :columns => 'day', :from => "2007-03-23", :to => "2007-03-23", :criteria => ["member", "activity"]
111 get :report, :project_id => 1, :columns => 'day', :from => "2007-03-23", :to => "2007-03-23", :criteria => ["user", "activity"]
112 assert_response :success
112 assert_response :success
113 assert_template 'report'
113 assert_template 'report'
114 assert_not_nil assigns(:report)
114 assert_not_nil assigns(:report)
@@ -116,7 +116,7 class TimeEntryReportsControllerTest < ActionController::TestCase
116 end
116 end
117
117
118 def test_report_at_issue_level
118 def test_report_at_issue_level
119 get :report, :project_id => 1, :issue_id => 1, :columns => 'month', :from => "2007-01-01", :to => "2007-12-31", :criteria => ["member", "activity"]
119 get :report, :project_id => 1, :issue_id => 1, :columns => 'month', :from => "2007-01-01", :to => "2007-12-31", :criteria => ["user", "activity"]
120 assert_response :success
120 assert_response :success
121 assert_template 'report'
121 assert_template 'report'
122 assert_not_nil assigns(:report)
122 assert_not_nil assigns(:report)
@@ -161,12 +161,12 class TimeEntryReportsControllerTest < ActionController::TestCase
161
161
162 def test_report_all_projects_csv_export
162 def test_report_all_projects_csv_export
163 get :report, :columns => 'month', :from => "2007-01-01", :to => "2007-06-30",
163 get :report, :columns => 'month', :from => "2007-01-01", :to => "2007-06-30",
164 :criteria => ["project", "member", "activity"], :format => "csv"
164 :criteria => ["project", "user", "activity"], :format => "csv"
165 assert_response :success
165 assert_response :success
166 assert_equal 'text/csv; header=present', @response.content_type
166 assert_equal 'text/csv; header=present', @response.content_type
167 lines = @response.body.chomp.split("\n")
167 lines = @response.body.chomp.split("\n")
168 # Headers
168 # Headers
169 assert_equal 'Project,Member,Activity,2007-3,2007-4,Total', lines.first
169 assert_equal 'Project,User,Activity,2007-3,2007-4,Total', lines.first
170 # Total row
170 # Total row
171 assert_equal 'Total,"","",154.25,8.65,162.90', lines.last
171 assert_equal 'Total,"","",154.25,8.65,162.90', lines.last
172 end
172 end
@@ -174,12 +174,12 class TimeEntryReportsControllerTest < ActionController::TestCase
174 def test_report_csv_export
174 def test_report_csv_export
175 get :report, :project_id => 1, :columns => 'month',
175 get :report, :project_id => 1, :columns => 'month',
176 :from => "2007-01-01", :to => "2007-06-30",
176 :from => "2007-01-01", :to => "2007-06-30",
177 :criteria => ["project", "member", "activity"], :format => "csv"
177 :criteria => ["project", "user", "activity"], :format => "csv"
178 assert_response :success
178 assert_response :success
179 assert_equal 'text/csv; header=present', @response.content_type
179 assert_equal 'text/csv; header=present', @response.content_type
180 lines = @response.body.chomp.split("\n")
180 lines = @response.body.chomp.split("\n")
181 # Headers
181 # Headers
182 assert_equal 'Project,Member,Activity,2007-3,2007-4,Total', lines.first
182 assert_equal 'Project,User,Activity,2007-3,2007-4,Total', lines.first
183 # Total row
183 # Total row
184 assert_equal 'Total,"","",154.25,8.65,162.90', lines.last
184 assert_equal 'Total,"","",154.25,8.65,162.90', lines.last
185 end
185 end
@@ -211,12 +211,12 class TimeEntryReportsControllerTest < ActionController::TestCase
211
211
212 get :report, :project_id => 1, :columns => 'day',
212 get :report, :project_id => 1, :columns => 'day',
213 :from => "2011-11-11", :to => "2011-11-11",
213 :from => "2011-11-11", :to => "2011-11-11",
214 :criteria => ["member"], :format => "csv"
214 :criteria => ["user"], :format => "csv"
215 assert_response :success
215 assert_response :success
216 assert_equal 'text/csv; header=present', @response.content_type
216 assert_equal 'text/csv; header=present', @response.content_type
217 lines = @response.body.chomp.split("\n")
217 lines = @response.body.chomp.split("\n")
218 # Headers
218 # Headers
219 s1 = "\xa6\xa8\xad\xfb,2011-11-11,\xc1`\xadp"
219 s1 = "\xa5\xce\xa4\xe1,2011-11-11,\xc1`\xadp"
220 s2 = "\xc1`\xadp"
220 s2 = "\xc1`\xadp"
221 if s1.respond_to?(:force_encoding)
221 if s1.respond_to?(:force_encoding)
222 s1.force_encoding('Big5')
222 s1.force_encoding('Big5')
@@ -262,12 +262,12 class TimeEntryReportsControllerTest < ActionController::TestCase
262
262
263 get :report, :project_id => 1, :columns => 'day',
263 get :report, :project_id => 1, :columns => 'day',
264 :from => "2011-11-11", :to => "2011-11-11",
264 :from => "2011-11-11", :to => "2011-11-11",
265 :criteria => ["member"], :format => "csv"
265 :criteria => ["user"], :format => "csv"
266 assert_response :success
266 assert_response :success
267 assert_equal 'text/csv; header=present', @response.content_type
267 assert_equal 'text/csv; header=present', @response.content_type
268 lines = @response.body.chomp.split("\n")
268 lines = @response.body.chomp.split("\n")
269 # Headers
269 # Headers
270 s1 = "\xa6\xa8\xad\xfb,2011-11-11,\xc1`\xadp"
270 s1 = "\xa5\xce\xa4\xe1,2011-11-11,\xc1`\xadp"
271 if s1.respond_to?(:force_encoding)
271 if s1.respond_to?(:force_encoding)
272 s1.force_encoding('Big5')
272 s1.force_encoding('Big5')
273 end
273 end
@@ -303,12 +303,12 class TimeEntryReportsControllerTest < ActionController::TestCase
303
303
304 get :report, :project_id => 1, :columns => 'day',
304 get :report, :project_id => 1, :columns => 'day',
305 :from => "2011-11-11", :to => "2011-11-11",
305 :from => "2011-11-11", :to => "2011-11-11",
306 :criteria => ["member"], :format => "csv"
306 :criteria => ["user"], :format => "csv"
307 assert_response :success
307 assert_response :success
308 assert_equal 'text/csv; header=present', @response.content_type
308 assert_equal 'text/csv; header=present', @response.content_type
309 lines = @response.body.chomp.split("\n")
309 lines = @response.body.chomp.split("\n")
310 # Headers
310 # Headers
311 s1 = "Membre;2011-11-11;Total"
311 s1 = "Utilisateur;2011-11-11;Total"
312 s2 = "Total"
312 s2 = "Total"
313 if s1.respond_to?(:force_encoding)
313 if s1.respond_to?(:force_encoding)
314 s1.force_encoding('ISO-8859-1')
314 s1.force_encoding('ISO-8859-1')
General Comments 0
You need to be logged in to leave comments. Login now