Class: Checkoff::Internal::SearchUrl::CustomFieldVariant::NoValue

Inherits:
CustomFieldVariant show all
Defined in:
lib/checkoff/internal/search_url/custom_field_variant.rb

Overview

custom_field_#CustomFieldVariant#gid.variant = ‘no_value’

Instance Method Summary collapse

Methods inherited from CustomFieldVariant

#initialize

Constructor Details

This class inherits a constructor from Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant

Instance Method Details

#convertObject



118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/checkoff/internal/search_url/custom_field_variant.rb', line 118

def convert
  ensure_no_remaining_params!

  api_params = { "custom_fields.#{gid}.is_set" => 'false' }
  # As of 2023-02, the 'is_set' => 'false' seems to not do
  # the intuitive thing on multi-select fields; it either
  # operates as a no-op or operates the same as 'true'; not
  # sure.
  #
  # Let's handle those with a filter afterwards.
  task_selector = [:nil?, [:custom_field_gid_value, gid]]
  [api_params, task_selector]
end