Skip to content

Commit

Permalink
Merge pull request #7419 from mzazrivec/render_multi_tags_in_request_…
Browse files Browse the repository at this point in the history
…dialog_details

Correctly render multi-tags in request details dialog

(cherry picked from commit 20f2cd5)

https://bugzilla.redhat.com/show_bug.cgi?id=1886887
  • Loading branch information
h-kataria authored and simaishi committed Nov 11, 2020
1 parent a8b5faa commit 4f86581
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/views/miq_request/_request_dialog_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

- when 'DialogFieldTagControl'
- value = wf.value(field.name) || '' # it returns in format Clasification::id
- _, classification_id = value.split('::')
- current_classification = Classification.find_by(:id => classification_id)
= h(current_classification.nil? ? '' : current_classification.description)
- classifications = value.split(',').map { |c| Classification.find_by(:id => c.split('::').second).description }
- if classifications.empty?
= h('')
-else
= h(classifications.join(', '))

0 comments on commit 4f86581

Please sign in to comment.