From 0a3bfeb37f82161de34abcec321a994a365a5cc1 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Mon, 4 Nov 2024 14:53:31 -0500 Subject: [PATCH] Revert "Merge pull request #9220 from GilbertCherrie/fix_request_form_fields" This reverts commit cf20fa1c3f051bca44e895f4578d1801aa6591ec, reversing changes made to 43bb230b4d0690fe238054d0f57b08d076bba8e6. --- .../miq_request/_request_dialog_details.html.haml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/views/miq_request/_request_dialog_details.html.haml b/app/views/miq_request/_request_dialog_details.html.haml index 96700c4df43..8f53976777a 100644 --- a/app/views/miq_request/_request_dialog_details.html.haml +++ b/app/views/miq_request/_request_dialog_details.html.haml @@ -28,14 +28,13 @@ = h(field.values.detect { |k, _v| k == wf.value(field.name) }.try(:last) || wf.value(field.name)) - when "DialogFieldDropDownList" - - if field.value.instance_of?(Array) - = h(field.value.blank? ? _("") : h(field.value.join(", "))) - - else - = h(field.value.blank? ? _("") : h(field.value)) + = h(field.value.blank? ? _("") : field.value.to_s.gsub("\x1F", ", ")) - when 'DialogFieldTagControl' - - value = wf.value(field.name) || '' - - classifications = Classification.where(:id => value).pluck(:description) + - value = wf.value(field.name) || '' # it returns in format Clasification::id + - classifications = value.split(',').map do |c| + - classification = Classification.find_by(id: c.split('::').second) + - classification.description if classification - if classifications.empty? = h('') -else