プロジェクト

全般

プロフィール

Vote #81323

完了

Atom feed of the activity page does not contain items after the second page

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Activity view_50
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
50
version_id:
164
issue_org_id:
34933
author_id:
362529
assigned_to_id:
332
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

I created a patch.

<pre><code class="diff">
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|
</code></pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
In attachment:34933-v2.patch, I have changed the test name.
--------------------------------------------------------------------------------
Committed the patch. Thank you.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,35413,Add missing fixtures to ActivitiesControllerTest

Admin Redmine さんが4年以上前に更新

  • カテゴリActivity view_50 にセット
  • 対象バージョン4.1.3_164 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0