Project

General

Profile

Actions

Feature #30346

closed

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

Added by VD DV about 5 years ago. Updated over 4 years ago.

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

0%

Estimated time:
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.


Files

report.png (217 KB) report.png Marius BĂLTEANU, 2019-01-07 05:22
filter.png (310 KB) filter.png Marius BĂLTEANU, 2019-01-07 05:22
0001-Adds-Target-Version-column-to-the-list-of-Available-.patch (3.53 KB) 0001-Adds-Target-Version-column-to-the-list-of-Available-.patch Marius BĂLTEANU, 2019-11-06 22:36

Related issues

Related to Redmine - Feature #14130: Spent Time Report Filter optionsNew

Actions
Related to Redmine - Feature #23401: Add tracker and status columns/filters to detailed timelogClosedJean-Philippe Lang

Actions
Related to Redmine - Feature #28391: Add issue category filter and column to spent time queriesClosedGo MAEDA

Actions
Related to Redmine - Patch #32478: Add missing fixture to TimelogControllerTestClosedGo MAEDA

Actions
Actions #1

Updated by Marius BĂLTEANU about 5 years ago

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.

Actions #2

Updated by VD DV about 5 years 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.

Actions #3

Updated by Marius BĂLTEANU about 5 years 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)
Actions #4

Updated by Marius BĂLTEANU about 5 years ago

Actions #5

Updated by Pablo Sanxiao over 4 years 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

Actions #6

Updated by Go MAEDA over 4 years ago

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

Updated by Go MAEDA over 4 years ago

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

Updated by Go MAEDA over 4 years 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 -
Actions #9

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

Actions #10

Updated by Marius BĂLTEANU over 4 years ago

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

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

Actions #12

Updated by Marius BĂLTEANU over 4 years ago

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

Here it is.

Actions #13

Updated by Marius BĂLTEANU over 4 years ago

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

Updated by Go MAEDA over 4 years 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),
   ]
Actions #16

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

Actions #17

Updated by Go MAEDA over 4 years ago

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

Committed the patch. Thank you.

Actions #18

Updated by Go MAEDA over 4 years ago

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

Also available in: Atom PDF