Skip to content

Commit 0a3bfeb

Browse files
committed
Revert "Merge pull request #9220 from GilbertCherrie/fix_request_form_fields"
This reverts commit cf20fa1, reversing changes made to 43bb230.
1 parent 8bc61a8 commit 0a3bfeb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

app/views/miq_request/_request_dialog_details.html.haml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@
2828
= h(field.values.detect { |k, _v| k == wf.value(field.name) }.try(:last) || wf.value(field.name))
2929

3030
- when "DialogFieldDropDownList"
31-
- if field.value.instance_of?(Array)
32-
= h(field.value.blank? ? _("<None>") : h(field.value.join(", ")))
33-
- else
34-
= h(field.value.blank? ? _("<None>") : h(field.value))
31+
= h(field.value.blank? ? _("<None>") : field.value.to_s.gsub("\x1F", ", "))
3532

3633
- when 'DialogFieldTagControl'
37-
- value = wf.value(field.name) || ''
38-
- classifications = Classification.where(:id => value).pluck(:description)
34+
- value = wf.value(field.name) || '' # it returns in format Clasification::id
35+
- classifications = value.split(',').map do |c|
36+
- classification = Classification.find_by(id: c.split('::').second)
37+
- classification.description if classification
3938
- if classifications.empty?
4039
= h('')
4140
-else

0 commit comments

Comments
 (0)