プロジェクト

全般

プロフィール

Vote #80705

完了

Missing subject and tracker name in CSV export of time entries report

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

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

0%

予定工数:
category_id:
13
version_id:
159
issue_org_id:
33052
author_id:
308182
assigned_to_id:
332
comments:
8
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
99
ステータス-->[Closed]

説明

CSV exports of time entries report no longer contain issue subject and tracker name since Redmine 4.0.0.

+Steps to reproduce+:

Go to a project

Go to Spent time tab

Go to Report tab

Add Issue

Click on CSV export link

The exported CSV contains column @Issue@ with only issue ID in the exported values. In previous versions (tested on Redmine 3.4.13) it contained values in the following format: @#{obj.tracker} ##{obj.id}: #{obj.subject}@.

Tested on clean Docker image @redmine:4.0.0@ and Redmine 4.1.0.

It seems it was broken in #29042.


journals

Redmine 3.4:
<pre>
Issue,2007-3,2007-4,Total time
[none],"",7.65,7.65
Bug #1: Cannot print recipes,154.25,"",154.25
Bug #3: Error 281 when updating a recipe,"",1.00,1.00
Total time,154.25,8.65,162.90
</pre>

trunk:
<pre>
Issue,2007-3,2007-4,Total time
[none],"",7.65,7.65
#1,154.25,"",154.25
#3,"",1.00,1.00
Total time,154.25,8.65,162.90
</pre>
--------------------------------------------------------------------------------
I added a test to cover for this regressions and a possible fix for the issue in my first patch.
I'm not sure if a change in a place that central will have negative side effects.
I checked the few places where @format_object@ was used outside of HTML templates and helpers and ran all unit tests locally and it seemed fine to me. What do you think?

My second patch just contains a minor source code improvement: @Redmine::Helpers::TimeReport@ currently never uses the issue argument (which doesn't seem to be set to any value in that controller anyways), so I removed it to prevent confusion.
--------------------------------------------------------------------------------
Oh sorry I realized I included an unnecessary line in the unit test.... this is the updated patch
--------------------------------------------------------------------------------
Kevin Fischer wrote:
> I added a test to cover for this regressions and a possible fix for the issue in my first patch.
> I'm not sure if a change in a place that central will have negative side effects.
> I checked the few places where @format_object@ was used outside of HTML templates and helpers and ran all unit tests locally and it seemed fine to me. What do you think?
Thanks Kevin for writing the patch. I think it's safer to fix this in @timelog_helper.rb@ as it was before #29042, please find attached a slightly modified patch. Test results "here":https://gitlab.com/redmine-org/redmine/pipelines/122666400

>
> My second patch just contains a minor source code improvement: @Redmine::Helpers::TimeReport@ currently never uses the issue argument (which doesn't seem to be set to any value in that controller anyways), so I removed it to prevent confusion.
Please open a new ticket with this patch.

--------------------------------------------------------------------------------
Committed the patch. Thank you.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Guys, I can see this issue in the latest version 4.1.0 as well. Has anyone else been able to replicate it?
--------------------------------------------------------------------------------
Rohit Thakral wrote:
> Guys, I can see this issue in the latest version 4.1.0 as well. Has anyone else been able to replicate it?

The fix will be available in the next releases (4.0.7, 4.1.1 and 4.2.0).

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

Admin Redmine さんが約4年前に更新

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

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

いいね!0
いいね!0