mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 17:56:03 +01:00
Include updated_on and passwd_changed_on columns when exporting users to CSV (#33347).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@19740 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -78,9 +78,11 @@ module UsersHelper
|
|||||||
'lastname',
|
'lastname',
|
||||||
'mail',
|
'mail',
|
||||||
'admin',
|
'admin',
|
||||||
|
'status',
|
||||||
'created_on',
|
'created_on',
|
||||||
|
'updated_on',
|
||||||
'last_login_on',
|
'last_login_on',
|
||||||
'status'
|
'passwd_changed_on'
|
||||||
]
|
]
|
||||||
user_custom_fields = UserCustomField.all
|
user_custom_fields = UserCustomField.all
|
||||||
|
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ en:
|
|||||||
field_mail_notification: Email notifications
|
field_mail_notification: Email notifications
|
||||||
field_admin: Administrator
|
field_admin: Administrator
|
||||||
field_last_login_on: Last connection
|
field_last_login_on: Last connection
|
||||||
|
field_passwd_changed_on: Password last changed
|
||||||
field_language: Language
|
field_language: Language
|
||||||
field_effective_date: Due date
|
field_effective_date: Due date
|
||||||
field_password: Password
|
field_password: Password
|
||||||
|
|||||||
@@ -68,12 +68,16 @@ class UsersControllerTest < Redmine::ControllerTest
|
|||||||
|
|
||||||
def test_index_csv
|
def test_index_csv
|
||||||
with_settings :default_language => 'en' do
|
with_settings :default_language => 'en' do
|
||||||
|
user = User.logged.status(1).first
|
||||||
|
user.update(passwd_changed_on: Time.current.last_month)
|
||||||
get :index, :params => { :format => 'csv' }
|
get :index, :params => { :format => 'csv' }
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
assert_equal User.logged.status(1).count, response.body.chomp.split("\n").size - 1
|
assert_equal User.logged.status(1).count, response.body.chomp.split("\n").size - 1
|
||||||
assert_include 'active', response.body
|
assert_include 'active', response.body
|
||||||
assert_not_include 'locked', response.body
|
assert_not_include 'locked', response.body
|
||||||
|
assert_include format_time(user.updated_on), response.body
|
||||||
|
assert_include format_time(user.passwd_changed_on), response.body
|
||||||
assert_equal 'text/csv', @response.media_type
|
assert_equal 'text/csv', @response.media_type
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user