Index: app/controllers/activities_controller.rb =================================================================== --- app/controllers/activities_controller.rb (revision 14645) +++ app/controllers/activities_controller.rb (working copy) @@ -37,8 +37,19 @@ @activity = Redmine::Activity::Fetcher.new(User.current, :project => @project, :with_subprojects => @with_subprojects, :author => @author) + pref = User.current.pref @activity.scope_select {|t| !params["show_#{t}"].nil?} - @activity.scope = (@author.nil? ? :default : :all) if @activity.scope.empty? + if @activity.scope.present? + pref.activity_scope = @activity.scope + pref.save + else + if @author.nil? + scope = pref.activity_scope & @activity.event_types + @activity.scope = scope.present? ? scope : :default + else + @activity.scope = :all + end + end events = @activity.events(@date_from, @date_to) Index: app/models/user_preference.rb =================================================================== --- app/models/user_preference.rb (revision 14645) +++ app/models/user_preference.rb (working copy) @@ -59,4 +59,7 @@ def no_self_notified; (self[:no_self_notified] == true || self[:no_self_notified] == '1'); end def no_self_notified=(value); self[:no_self_notified]=value; end + + def activity_scope; self[:activity_scope].to_a ; end + def activity_scope=(value); self[:activity_scope]=value ; end end