Project

General

Profile

Actions

Defect #8615

closed

Custom 'version' fields don't show shared versions

Added by Dmitry Salashnik over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
Start date:
2011-06-15
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

subj.

for fix i change in file app\models\custom_fields.rb:

  def possible_values_options(obj=nil)
    case field_format
    when 'user', 'version'
      if obj.respond_to?(:project) && obj.project
        case field_format
        when 'user'
          obj.project.users.sort.collect {|u| [u.to_s, u.id.to_s]}
        when 'version'
          # CHANGES HERE (versions -> shared versions)
          obj.project.shared_versions.sort.collect {|u| [u.to_s, u.id.to_s]} 
        end
      elsif obj.is_a?(Array)
        obj.collect {|o| possible_values_options(o)}.inject {|memo, v| memo & v}
      else
        []
      end
    else
      read_attribute :possible_values
    end
  end


Related issues

Has duplicate Redmine - Defect #8483: Content in the new custom field "referencing version table" is empty in a subproject (sharing version)Closed2011-06-01

Actions
Actions

Also available in: Atom PDF