Vote #80705
完了Missing subject and tracker name in CSV export of time entries report
0%
説明
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).
--------------------------------------------------------------------------------