Project

General

Profile

Actions

Defect #33052

closed

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

Added by Sandra Tatarevicova about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Time tracking
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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

Steps to reproduce:

  1. Go to a project
  2. Go to Spent time tab
  3. Go to Report tab
  4. Add Issue
  5. Click on CSV export link
  6. 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

0001-33052-fix-issue-text-format.patch (2.29 KB) 0001-33052-fix-issue-text-format.patch Patch for the issue Kevin Fischer, 2020-03-02 04:19
0002-remove-unused-issue-argument.patch (1.62 KB) 0002-remove-unused-issue-argument.patch Improvement: Remove unused argument Kevin Fischer, 2020-03-02 04:19
0001-33052-fix-issue-text-format-v2.patch (2.26 KB) 0001-33052-fix-issue-text-format-v2.patch Patch for the issue Kevin Fischer, 2020-03-02 04:40
0001-Fix-missing-subject-and-tracker-name-in-CSV-export-o.patch (2 KB) 0001-Fix-missing-subject-and-tracker-name-in-CSV-export-o.patch Marius BĂLTEANU, 2020-03-03 00:22
Actions #1

Updated by Go MAEDA about 4 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

Actions #2

Updated by Kevin Fischer about 4 years ago

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.

Actions #3

Updated by Kevin Fischer about 4 years ago

Oh sorry I realized I included an unnecessary line in the unit test.... this is the updated patch

Actions #4

Updated by Marius BĂLTEANU about 4 years ago

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

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.

Actions #5

Updated by Go MAEDA about 4 years ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you.

Actions #6

Updated by Go MAEDA about 4 years ago

  • Status changed from Resolved to Closed
Actions #7

Updated by Rohit Thakral about 4 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?

Actions #8

Updated by Marius BĂLTEANU about 4 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).

Actions

Also available in: Atom PDF