Feature #9850

Differentiate shared versions in version-format custom field drop-downs by prepending its project name

Added by Mischa The Evil over 5 years ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:3.4.0
Resolution:Fixed

Description

Like the subject already implies, I'd suggest to differentiate available shared versions in version-format custom field drop-downs by prepending its project name like it is already done for the target version attribute drop-downs. This way we can (also) distinct the versions from eachother whenever there are duplicates.
Some screenshots of what I'm proposing:

This is how it is now:

This is how it could look like (so we can distict the both 1.0's)

tv_differenciation.jpg (10.7 KB) Mischa The Evil, 2011-12-21 03:32

vcf_differenciation.jpg (6.39 KB) Mischa The Evil, 2011-12-21 03:32


Related issues

Related to Redmine - Feature #9851: Equalize the way how available shared versions are differ... New
Related to Redmine - Feature #19965: values of custom fileds of version type should be prefixe... Closed
Related to Redmine - Feature #23265: Group versions by status in version custom field filter Closed
Duplicated by Redmine - Feature #10926: Version custom field should display the project name in t... Closed
Duplicated by Redmine - Feature #14449: Versions custom field format Closed

History

#1 Updated by Mischa The Evil over 5 years ago

  • Description updated (diff)

#2 Updated by Mischa The Evil over 5 years ago

  • Subject changed from Differenciate available shared versions in version-format custom field drop-downs by prepending its project name to Differentiate available shared versions in version-format custom field drop-downs by prepending its project name
  • Description updated (diff)

Fixing ugly typos.

#3 Updated by Maher Gamal about 5 years ago

Can we have this in an upcoming minor version ?

#4 Updated by Maher Gamal about 5 years ago

The duplicate #10926 was marked as Candidate for the next minor version, can we mark this one as well to have it scheduled.

#5 Updated by Etienne Massip about 5 years ago

  • Target version set to Candidate for next minor release

#6 Updated by claude g over 4 years ago

+1

#7 Updated by Mischa The Evil over 4 years ago

Simple patch could work. In source:/trunk/app/models/custom_field.rb@11275#L99 change:

-         obj.project.shared_versions.sort.collect {|u| [u.to_s, u.id.to_s]}
+         obj.project.shared_versions.sort.collect {|u| ["#{u.project.to_s} - #{u.to_s}", u.id.to_s]}

to prepend "{project name} - " before the "{version name}".
This makes it possible to differentiate shared versions in version format custom field drop-downs.

#8 Updated by Mischa The Evil over 4 years ago

Note: the patch in note-7 does not prepend project names to custom field values in the custom field column on the issue list. This is the same behavior as currently implemented for the target version column. It might be better to change this also for (at least, shared) versions to distinct versions from other projects from current project versions.
Such should follow a fix for this issue first, so it will be better to open a new issue for that. Also #9851 needs to be taken into account since it is related in sense of how target-versions are displayed throughout the Redmine UI (now thinking of version#x links, roadmap, version views etc. also).

#9 Updated by Mischa The Evil over 4 years ago

Mischa The Evil wrote:

Note: the patch in note-7 does not prepend project names to custom field values in the custom field column on the issue list. This is the same behavior as currently implemented for the target version column. It might be better to change this also for (at least, shared) versions to distinct versions from other projects from current project versions.
[...] Also #9851 needs to be taken into account since it is related in sense of how target-versions are displayed throughout the Redmine UI (now thinking of version#x links, roadmap, version views etc. also).

Follow-up on #9850-8 [note-8], extracted from (duplicate) issue #10926-5 [note-5]:

Actually, the project name is already prepended to shared versions displayed on the Roadmap view with or without using the Subprojects selection in the right side-bar. This also applies to both the project- and global Gantt views but specifically not for:
  • the project Calendar view (since shared versions aren't displayed there anyways);
  • the Version view (since versions are always tied to a single project anyway);
  • the project- and global Issue list view columns and finally, I think,
  • the Redmine version links.

Despite all the above: this issue is specifically about version-format custom field values and not the target versions.

Tested on Redmine 2.1.x / *.m.redmine.org.

#10 Updated by Mischa The Evil almost 4 years ago

#11 Updated by Mischa The Evil almost 4 years ago

#12 Updated by Mischa The Evil almost 4 years ago

#13 Updated by Maicon Zucco about 3 years ago

Hi,

How I change this in 2.5.1 version?

Thanks.

#14 Updated by Toshi MARUYAMA almost 2 years ago

  • Related to Feature #19965: values of custom fileds of version type should be prefixed with or grouped by project name added

#15 Updated by Alexis Parent over 1 year ago

+1

#16 Updated by Christophe Portier over 1 year ago

+1

#17 Updated by Maicon Zucco over 1 year ago

I found a way to change on 2.5.3:

--- from_file
+++ lib/redmine/field_format.rb
@@ -690,7 +690,8 @@
               scope = scope.where(:status => statuses.map(&:to_s))
             end
           end
-          scope.sort.collect {|u| [u.to_s, u.id.to_s]}
+          scope.sort_by! {|u| ["#{u.project.to_s} - #{u.to_s}", u.id.to_s]}
+          scope.collect {|u| ["#{u.project.to_s} - #{u.to_s}", u.id.to_s]}
         else
           []
         end

#18 Updated by Mischa The Evil 4 months ago

  • Related to Feature #23265: Group versions by status in version custom field filter added

#19 Updated by Mischa The Evil 4 months ago

  • Status changed from New to Closed
  • Target version deleted (Candidate for next minor release)

The initial issue (indistinguishable shared versions in version-format custom field drop-downs) has been fixed by r16194 for #23265.

#20 Updated by Mischa The Evil about 1 month ago

  • Subject changed from Differentiate available shared versions in version-format custom field drop-downs by prepending its project name to Differentiate shared versions in version-format custom field drop-downs by prepending its project name
  • Target version set to 3.4.0
  • Resolution set to Fixed

Setting target version to 3.4.0 because I think that this fixed issue should appear on the changelog, in order to let everyone know about this long-awaited improvement.

Also available in: Atom PDF