Defect #21074 » 0001-do-not-display-default-values-that-aren-t-actually-s.patch
| app/helpers/issues_helper.rb | ||
|---|---|---|
|
r.to_html
|
||
|
end
|
||
|
# wrapper around show_value that prevents unsaved defaults to be shown
|
||
|
def show_value_for_reading(value)
|
||
|
if value.customized.custom_values.where(custom_field_id: value.custom_field.id).any?
|
||
|
show_value value
|
||
|
end
|
||
|
end
|
||
|
def render_half_width_custom_fields_rows(issue)
|
||
|
values = issue.visible_custom_field_values.reject {|value| value.custom_field.full_width_layout?}
|
||
|
return if values.empty?
|
||
| ... | ... | |
|
values.each_with_index do |value, i|
|
||
|
css = "cf_#{value.custom_field.id}"
|
||
|
m = (i < half ? :left : :right)
|
||
|
rows.send m, custom_field_name_tag(value.custom_field), show_value(value), :class => css
|
||
|
rows.send m, custom_field_name_tag(value.custom_field), show_value_for_reading(value), :class => css
|
||
|
end
|
||
|
end
|
||
|
end
|
||
| ... | ... | |
|
s = ''.html_safe
|
||
|
values.each_with_index do |value, i|
|
||
|
attr_value = show_value(value)
|
||
|
attr_value = show_value_for_reading(value)
|
||
|
next if attr_value.blank?
|
||
|
if value.custom_field.text_formatting == 'full'
|
||