Feature #30346

Add "Target Version" to the list of "Available columns" in "Spent time" Tab

Added by VD DV 11 months ago. Updated 9 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Time tracking
Target version:4.1.0
Resolution:Fixed

Description

I am evaluating last Redmine version (v4.0.0), and I have discovered that "Target Version" is missing at "Spent time" Tab in the list of "Available columns" while selecting columns for timelogs. Therefore, CSV export from "Spent time" TAB is also missing that valuable informatin for further spent time analysis.

It is clear that versions are tied to projects, and same "Target Version" literal in different projects might not be the same version, therefore might lead to confusion.
But, "Target Version" together with "Project" information (that is already selectable at "Available columns") can avoid any unclearness.

report.png (217 KB) Marius BALTEANU, 2019-01-07 05:22

filter.png (310 KB) Marius BALTEANU, 2019-01-07 05:22

0001-Adds-Target-Version-column-to-the-list-of-Available-.patch Magnifier (3.53 KB) Marius BALTEANU, 2019-11-06 22:36


Related issues

Related to Redmine - Feature #14130: Spent Time Report Filter options New
Related to Redmine - Feature #23401: Add tracker and status columns/filters to detailed timelog Closed
Related to Redmine - Feature #28391: Add issue category filter and column to spent time queries Closed
Related to Redmine - Patch #32478: Add missing fixture to TimelogControllerTest Closed

Associated revisions

Revision 19059
Added by Go MAEDA 9 days ago

Adds "Target Version" column to the list of "Available columns" in "Spent time" tab (#30346).

Patch by Marius BALTEANU.

History

#1 Updated by Marius BALTEANU 11 months ago

  • File filter.png added
  • File report.png added
  • Status changed from New to Needs feedback
  • Assignee set to VD DV

In which version of Redmine did you see the "Target Version" (Version) as available column in "Spent time" tab? I've double checked now in Redmine 3.4 and Redmine 4.0 and is not available as column, it is available as filter and group criteria in the Reports tab (not Details). Please see below screenshots.

#2 Updated by VD DV 10 months ago

You are right. There is no such column in previous versions. Therefore this issue might be evaluated not as deffect but as a new feature.

#3 Updated by Marius BALTEANU 10 months ago

  • Tracker changed from Defect to Feature
  • Subject changed from "Target Version" is missing at "Spent time" Tab in the list of "Available columns" to Add "Target Version" to the list of "Available columns" in "Spent time" Tab
  • Status changed from Needs feedback to New
  • Assignee deleted (VD DV)

#4 Updated by Marius BALTEANU 10 months ago

#5 Updated by Pablo Sanxiao about 1 month ago

What about this issue? Is it going to plan to be added for next redmine version?

I think it's quite easy to implement and very useful and demanded. I don't know too much about redmine source code but I think patch would be very similar to this one: https://www.redmine.org/issues/28391

#6 Updated by Go MAEDA 15 days ago

  • Related to Feature #23401: Add tracker and status columns/filters to detailed timelog added

#7 Updated by Go MAEDA 15 days ago

  • Related to Feature #28391: Add issue category filter and column to spent time queries added

#8 Updated by Go MAEDA 15 days ago

+1

Spent time tab has 4 types of filters for core fields of issues. They are Tracker, Status, Target version, and Category. However, only Target version is not included in available columns. I think it is quite odd that the field can be used as a filter is not included in available columns.

I think the target version field should have been added to available columns when #23401 was implemented.

Before r15738:
Field Filters Available columns
Tracker - -
Status - -
Target version -
r15738:
Field Filters Available columns
Tracker
Status
Target version -

#9 Updated by Marius BALTEANU 14 days ago

  • File 0001-Adds-Target-Version-column-to-the-list-of-Available-.patch added
  • Target version set to Candidate for next major release

Here is a patch for this feature. Test results here.

#10 Updated by Marius BALTEANU 14 days ago

  • File deleted (0001-Adds-Target-Version-column-to-the-list-of-Available-.patch)

#11 Updated by Marius BALTEANU 14 days ago

Marius BALTEANU wrote:

Here is a patch for this feature. Test results here.

There was an error in my proposed patch, I'll repost the patch soon.

#12 Updated by Marius BALTEANU 12 days ago

  • File 0001-Adds-Target-Version-column-to-the-list-of-Available-.patch added

Here it is.

#13 Updated by Marius BALTEANU 12 days ago

  • File deleted (0001-Adds-Target-Version-column-to-the-list-of-Available-.patch)

#15 Updated by Go MAEDA 10 days ago

  • Target version changed from Candidate for next major release to 4.1.0

Thank you for posting the patch. But I had to change it as follows. Without the change, the id of the version is shown in the column instead of the name.

Setting the target version to 4.1.0.

diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb
index 77929e740..ed0d4dfbd 100644
--- a/app/models/time_entry_query.rb
+++ b/app/models/time_entry_query.rb
@@ -34,7 +34,7 @@ class TimeEntryQuery < Query
     QueryAssociationColumn.new(:issue, :tracker, :caption => :field_tracker, :sortable => "#{Tracker.table_name}.position"),
     QueryAssociationColumn.new(:issue, :status, :caption => :field_status, :sortable => "#{IssueStatus.table_name}.position"),
     QueryAssociationColumn.new(:issue, :category, :caption => :field_category, :sortable => "#{IssueCategory.table_name}.name"),
-    QueryAssociationColumn.new(:issue, :fixed_version_id, :caption => :field_fixed_version, :sortable => Version.fields_for_order_statement),
+    QueryAssociationColumn.new(:issue, :fixed_version, :caption => :field_fixed_version, :sortable => Version.fields_for_order_statement),
     QueryColumn.new(:comments),
     QueryColumn.new(:hours, :sortable => "#{TimeEntry.table_name}.hours", :totalable => true),
   ]

#16 Updated by Marius BALTEANU 10 days ago

Go MAEDA wrote:

Thank you for posting the patch. But I had to change it as follows. Without the change, the id of the version is shown in the column instead of the name.

Setting the target version to 4.1.0.

[...]

Indeed, :fixed_version should be, I think I've mixed up some things before posting the patch.

#17 Updated by Go MAEDA 9 days ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you.

#18 Updated by Go MAEDA about 2 hours ago

  • Related to Patch #32478: Add missing fixture to TimelogControllerTest added

Also available in: Atom PDF