diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index efc9dce4d..33a217096 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -87,6 +87,11 @@ class UsersController < ApplicationController
:total => Issue.visible.where(:author_id => @user.id).count,
:open => Issue.visible.open.where(:author_id => @user.id).count
}
+ updated_issue_counts = Issue.joins(:journals, :status).merge(Journal.where(:user_id => @user.id)).visible.distinct.group(IssueStatus.arel_table[:is_closed]).count
+ @issue_counts[:updated] = {
+ :total => updated_issue_counts.values.sum,
+ :open => updated_issue_counts.detect{|k,v| break v unless ActiveRecord::Type::Boolean.new.cast(k)} || 0,
+ }
respond_to do |format|
format.html {
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 488e4b93a..5a6a1fc02 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -72,6 +72,24 @@
issues_path(:set_filter => 1, :status_id => '*', :author_id => @user.id, :sort => sort_cond) %>
+
+
+ <%= link_to l(:label_updated_issues),
+ issues_path(:set_filter => 1, :updated_by => @user.id, :sort => sort_cond) %>
+ |
+
+ <%= link_to @issue_counts[:updated][:open],
+ issues_path(:set_filter => 1, :updated_by=> @user.id, :sort => sort_cond) %>
+ |
+
+ <%= link_to @issue_counts[:updated][:total] - @issue_counts[:updated][:open],
+ issues_path(:set_filter => 1, :status_id => 'c', :updated_by => @user.id, :sort => sort_cond) %>
+ |
+
+ <%= link_to @issue_counts[:updated][:total],
+ issues_path(:set_filter => 1, :status_id => '*', :updated_by => @user.id, :sort => sort_cond) %>
+ |
+
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 8995800c3..48f1fe42c 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -624,6 +624,7 @@ en:
label_reported_issues: Reported issues
label_assigned_issues: Assigned issues
label_assigned_to_me_issues: Issues assigned to me
+ label_updated_issues: Updated issues
label_last_login: Last connection
label_registered_on: Registered on
label_activity: Activity
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 1160ec764..45a2ad53b 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -24,7 +24,7 @@ class UsersControllerTest < Redmine::ControllerTest
:custom_fields, :custom_values, :groups_users,
:auth_sources,
:enabled_modules,
- :issues, :issue_statuses,
+ :issues, :issue_statuses, :journals,
:trackers
def setup
@@ -201,6 +201,12 @@ class UsersControllerTest < Redmine::ControllerTest
assert_select 'td:nth-of-type(3)>a', :text => '2' # closed
assert_select 'td:nth-of-type(4)>a', :text => '13' # total
end
+ assert_select 'tr:nth-of-type(3)' do
+ assert_select 'td:nth-of-type(1)>a', :text => 'Updated issues'
+ assert_select 'td:nth-of-type(2)>a', :text => '3' # open
+ assert_select 'td:nth-of-type(3)>a', :text => '0' # closed
+ assert_select 'td:nth-of-type(4)>a', :text => '3' # total
+ end
end
end