プロジェクト

全般

プロフィール

Vote #70143

完了

Custom 'version' fields don't show shared versions

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Custom fields_14
対象バージョン:
開始日:
2011/06/15
期日:
進捗率:

0%

予定工数:
category_id:
14
version_id:
38
issue_org_id:
8615
author_id:
6855
assigned_to_id:
0
comments:
4
status_id:
5
tracker_id:
1
plus1:
1
affected_version:
closed_on:
affected_version_id:
35
ステータス-->[Closed]

説明

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


journals

--------------------------------------------------------------------------------
+1

I also applied this patch, which is quite 'natural' when you use version sharing option. It could be nice to let configure the custom field type 'version' between two modes :
* project versions only
OR
* shared versions
--------------------------------------------------------------------------------
Hi,

how to make it show only not closed shared versions in the custom field?

brv

--------------------------------------------------------------------------------
Fixed in r7772 with tests and merged in 1.2-stable.
Thanks.
--------------------------------------------------------------------------------


related_issues

duplicates,Closed,8483,Content in the new custom field "referencing version table" is empty in a subproject (sharing version)

Admin Redmine さんが3年以上前に更新

  • カテゴリCustom fields_14 にセット
  • 対象バージョン1.2.2_38 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0