find proper value in case of version custom fields (refs #22)
This commit is contained in:
@@ -210,9 +210,12 @@ private
|
||||
end
|
||||
|
||||
def detail_to_field(detail)
|
||||
field_format = nil
|
||||
|
||||
if detail.property == "cf"
|
||||
key = CustomField.find(detail.prop_key).name rescue nil
|
||||
title = key
|
||||
field_format = CustomField.find(detail.prop_key).field_format rescue nil
|
||||
elsif detail.property == "attachment"
|
||||
key = "attachment"
|
||||
title = I18n.t :label_attachment
|
||||
@@ -256,6 +259,12 @@ private
|
||||
value = "<#{object_url issue}|#{escape issue}>" if issue
|
||||
end
|
||||
|
||||
case field_format
|
||||
when "version"
|
||||
version = Version.find(detail.value) rescue nil
|
||||
value = escape version.to_s
|
||||
end
|
||||
|
||||
value = "-" if value.empty?
|
||||
|
||||
result = { :title => title, :value => value }
|
||||
|
||||
Reference in New Issue
Block a user