Defect #33052
closedMissing subject and tracker name in CSV export of time entries report
0%
Description
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.
Files
Updated by Go MAEDA almost 5 years ago
- Status changed from New to Confirmed
- Affected version changed from 4.1.0 to 4.0.0
Redmine 3.4:
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
trunk:
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
Updated by Kevin Fischer almost 5 years ago
- File 0001-33052-fix-issue-text-format.patch 0001-33052-fix-issue-text-format.patch added
- File 0002-remove-unused-issue-argument.patch 0002-remove-unused-issue-argument.patch added
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.
Updated by Kevin Fischer almost 5 years ago
Oh sorry I realized I included an unnecessary line in the unit test.... this is the updated patch
Updated by Marius BĂLTEANU almost 5 years ago
- File 0001-Fix-missing-subject-and-tracker-name-in-CSV-export-o.patch 0001-Fix-missing-subject-and-tracker-name-in-CSV-export-o.patch added
- Target version set to 4.0.7
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 whereformat_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
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.
Updated by Go MAEDA almost 5 years ago
- Status changed from Confirmed to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch. Thank you.
Updated by Rohit Thakral almost 5 years ago
Guys, I can see this issue in the latest version 4.1.0 as well. Has anyone else been able to replicate it?
Updated by Marius BĂLTEANU almost 5 years ago
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).