1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-17 09:02:02 +00:00

Atom feed of the activity page does not contain items after the second page (#34933).

Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@20931 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2021-04-12 09:10:41 +00:00
parent dfe7b0b0ce
commit 2c773d6393
2 changed files with 22 additions and 1 deletions

View File

@ -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|

View File

@ -125,6 +125,22 @@ class ActivitiesControllerTest < Redmine::ControllerTest
end
end
def test_index_atom_feed_should_respect_feeds_limit_setting
with_settings :feeds_limit => '20' do
get(
:index,
:params => {
:format => 'atom'
}
)
end
assert_response :success
assert_select 'feed' do
assert_select 'entry', :count => 20
end
end
def test_index_atom_feed_with_explicit_selection
get(
:index,