プロジェクト

全般

プロフィール

Vote #81720

完了

Time entries of sub-projects are not listed when activity is specified in filters

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

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

0%

予定工数:
category_id:
13
version_id:
172
issue_org_id:
36248
author_id:
362529
assigned_to_id:
107353
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

If the activity of the parent project is not a system activity, the time entries of the sub-projects are not displayed when the Activity filter is specified in the spent time list of the parent project.

Activity setting of parent project
!{width:600px;border:1px solid grey;}settings-time-tracking.png!

When the Activity filter is not used
!{width:600px;border:1px solid grey;}spent-time-list-without-activity-fillter.png!

When using the Activity filter
!{width:600px;border:1px solid grey;}spent-time-list-with-activity-fillter.png!


journals

I think the following patch can solve it.

<pre><code class="diff">
diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb
index 11128cfcd6..5fd4790893 100644
--- a/app/models/time_entry_query.rb
+++ b/app/models/time_entry_query.rb
@@ -88,7 +88,7 @@ class TimeEntryQuery < Query
activities = (project ? project.activities : TimeEntryActivity.shared)
add_available_filter(
"activity_id",
- :type => :list, :values => activities.map {|a| [a.name, a.id.to_s]}
+ :type => :list, :values => activities.map {|a| [a.name, (a.parent_id || a.id).to_s]}
)
add_available_filter(
"project.status",
</code></pre>
--------------------------------------------------------------------------------
I created a test. I have attached a patch containing #note-1.

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

--------------------------------------------------------------------------------
Setting the target version to 4.2.4.
--------------------------------------------------------------------------------
Patch committed, thanks!
--------------------------------------------------------------------------------

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

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

  • カテゴリTime tracking_13 にセット
  • 対象バージョン4.2.4_172 にセット

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

いいね!0
いいね!0