From 16fb1d28bf4de358ec6ad26f4d8ee63aabd519ed Mon Sep 17 00:00:00 2001 From: Christophe Bliard Date: Thu, 30 Oct 2025 10:08:10 +0100 Subject: [PATCH] Fix rubocop warning --- spec/support/table_helpers/table_representer.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/support/table_helpers/table_representer.rb b/spec/support/table_helpers/table_representer.rb index fe48fd265d7..6f7801ccced 100644 --- a/spec/support/table_helpers/table_representer.rb +++ b/spec/support/table_helpers/table_representer.rb @@ -63,19 +63,20 @@ module TableHelpers end def get_values(column, table_data) - if column.attribute == :schedule + case column.attribute + when :schedule start_dates = table_data.values_for_attribute(:start_date) due_dates = table_data.values_for_attribute(:due_date) ignore_non_working_days_values = ignore_non_working_days_values(table_data) start_dates.zip(due_dates, ignore_non_working_days_values).map do |start_date, due_date, ignore_non_working_days| schedule_column_representer.span(start_date, due_date, ignore_non_working_days) end - elsif column.attribute == :hierarchy + when :hierarchy table_data .values_for_attribute(:subject) .zip(get_hierarchy_levels(table_data)) .map! { |subject, level| column.format("#{' ' * level}#{subject}") } - elsif column.attribute == :identifier + when :identifier table_data.work_package_identifiers .map! { |identifier| column.format(identifier) } else