Skip to content

Commit

Permalink
WIP implement fix for bulk editting hierarchy items
Browse files Browse the repository at this point in the history
  • Loading branch information
brunopagno committed Nov 27, 2024
1 parent 2f13c60 commit 2655933
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/helpers/custom_fields_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ def custom_field_tag_for_bulk_edit(name, custom_field, project = nil) # rubocop:
options_for_select(base_options + custom_field.possible_values_options(project)),
id: field_id,
multiple: custom_field.multi_value?)
when "hierarchy"
options = [[I18n.t(:label_no_change_option), ""]]
options += custom_field.hierarchy_root.descendants.map { |item| ["#{item.label} (#{item.short})", item.id] }
styled_select_tag(field_name, options_for_select(options), id: field_id, multiple: custom_field.multi_value?)
else
styled_text_field_tag(field_name, "", id: field_id)
end
Expand Down

0 comments on commit 2655933

Please sign in to comment.