Atom feed of the activity page does not contain items after the second page
|Assignee:||Go MAEDA||% Done:|
I'm receiving Atom feeds on the Activity.
I thought I was receiving the number of feeds set in Administration > Settings > General > Maximum number of items in Atom feeds, but actually I received only the events displayed on the first page of the Activity.
Atom feed of the activity page does not contain items after the second page (#34933).
Patch by Yuichi HARADA.
#1 Updated by Yuichi HARADA 6 months ago
- File 34933.patch added
I created a patch.
diff --git a/app/controllers/activities_controller.rb b/app/controllers/activities_controller.rb index 745a40219..e1bba49f6 100644 --- a/app/controllers/activities_controller.rb +++ b/app/controllers/activities_controller.rb @@ -55,7 +55,12 @@ class ActivitiesController < ApplicationController end end - events = @activity.events(@date_from, @date_to) + events = + if params[:format] == 'atom' + @activity.events(nil, nil, :limit => Setting.feeds_limit.to_i) + else + @activity.events(@date_from, @date_to) + end if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, events.size, User.current, current_language]) respond_to do |format|
- File 34933-v2.patch added
- Subject changed from Received Atom feed entries only of the first page of Activity to Atom feed of the activity page does not contain items after the second page
- Target version changed from Candidate for next minor release to 4.1.3
In 34933-v2.patch, I have changed the test name.