From 9af54fe507d872dd205c330931c63dd2c0f77666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serge=20H=C3=A4nni?= Date: Mon, 13 Jul 2026 18:23:21 +0200 Subject: [PATCH] Add `default_values` and `fixed_values` to filters --- .../model/operator/reporting/report_aggregation_filter.rb | 8 ++++++++ .../operator/reporting/report_aggregation_filter_spec.rb | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/lib/ioki/model/operator/reporting/report_aggregation_filter.rb b/lib/ioki/model/operator/reporting/report_aggregation_filter.rb index 9f4af0c9..ec3e3419 100644 --- a/lib/ioki/model/operator/reporting/report_aggregation_filter.rb +++ b/lib/ioki/model/operator/reporting/report_aggregation_filter.rb @@ -24,6 +24,14 @@ class ReportAggregationFilter < Base attribute :localized_values, on: :read, type: :array + + attribute :default_values, + on: :read, + type: :array + + attribute :fixed_values, + on: :read, + type: :array end end end diff --git a/spec/ioki/model/operator/reporting/report_aggregation_filter_spec.rb b/spec/ioki/model/operator/reporting/report_aggregation_filter_spec.rb index 40108f26..5f619511 100644 --- a/spec/ioki/model/operator/reporting/report_aggregation_filter_spec.rb +++ b/spec/ioki/model/operator/reporting/report_aggregation_filter_spec.rb @@ -18,12 +18,16 @@ it { is_expected.to define_attribute(:localized_name).as(:string) } it { is_expected.to define_attribute(:values).as(:array) } it { is_expected.to define_attribute(:localized_values).as(:array) } + it { is_expected.to define_attribute(:default_values).as(:array) } + it { is_expected.to define_attribute(:fixed_values).as(:array) } it 'casts filter metadata' do expect(filter.name).to eq('operator_id') expect(filter.localized_name).to eq('Operator') expect(filter.values).to eq(%w[op-1 op-2]) expect(filter.localized_values).to eq(%w[Op-1 Op-2]) + expect(filter.default_values).to be_nil + expect(filter.fixed_values).to be_nil end it 'accepts unrestricted filter values' do