Feature #1189 » Updated-the-QueryColumn-code-to-be-allow_multi-aware.diff
| app/models/query.rb | ||
|---|---|---|
|
end
|
||
|
|
||
|
def value(issue)
|
||
|
cv = issue.custom_values.detect {|v| v.custom_field_id == @cf.id}
|
||
|
cv && @cf.cast_value(cv.value)
|
||
|
value= nil
|
||
|
if @cf.allow_multi
|
||
|
cva = issue.custom_values.find_all {|v| v.custom_field_id == @cf.id}
|
||
|
if cva.length >0
|
||
|
value= cva.join(", ")
|
||
|
end
|
||
|
else
|
||
|
value= (issue.custom_values.detect {|v| v.custom_field_id == @cf.id}).value
|
||
|
end
|
||
|
value && @cf.cast_value(value)
|
||
|
end
|
||
|
end
|
||