プロジェクト

全般

プロフィール

Vote #74864

完了

Project.activities returns different types depending on context

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

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

0%

予定工数:
category_id:
30
version_id:
75
issue_org_id:
15983
author_id:
74968
assigned_to_id:
1
comments:
1
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Project.active_activities, Project.all_activities and, ultimately, Project.activities return:

  • a database relation if the activities on the project are untouched (through TimeEntryActivity.shared.active)
  • an Array if some activities are overridden (through Project.system_activities_and_project_overrides).

This makes any calling code unable to make further operations on the results, and leads to errors that are hard to understand.


journals

Fixed in r12854, it now always returns a ActiveRecord::Relation.
--------------------------------------------------------------------------------

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

いいね!0
いいね!0