gitlab_support_readiness 1.0.109 → 1.0.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39eb80e26ea6a9d845d2960550460270c0814cd42acbb94fb5c2f55acba05de0
4
- data.tar.gz: a39b2da820bb0dff595e37730524c6e8c45094394da5f49d8c039375744995cb
3
+ metadata.gz: 76db68661570a026ab3995ec2a8b9ab882372b5589ed401881844485298ca670
4
+ data.tar.gz: 1bdb1a5122dca406871c78e1b65449c12422824163384e9bfff4c2d14145b8c7
5
5
  SHA512:
6
- metadata.gz: 673e369c3b98af22767d25f7c7f44c59c0fc62772e8c93001927db71a664efc66d8bdf91f81e2109b151ef88f221ed2eb2720d3055c6ed22efc84736bcae8e8b
7
- data.tar.gz: ff562b6d1caf1c3886c28d5b228b7921f1923efd58c4f0f4d40669fbadb8a50b68c1a630f445710820ed157d6dad6ed9ae27169209d1cbfb08aff5d6e872b856
6
+ metadata.gz: 4fe8cce60d44b4874f4d91bb8f1d3d5a6f50c8692e2f066cfc7ff232200d5f8fde8ed837bc9868facfaa294eea4ee2c0230dd00bebc23518afa7dbef7b5b7612
7
+ data.tar.gz: 81ffcf980569383eb449ad461e47a0f7185d9f7025ebd6e0bad8668e0567a7d9983fb18a54d8691852a84aeb30faff77b64941b0556e5166e1ad9e7de9d05fcd
@@ -174,6 +174,16 @@ module Readiness
174
174
  def self.convert_names_to_ids(trigger)
175
175
  %w[any all].each do |type|
176
176
  trigger['conditions'][type].each_with_index do |c, i|
177
+ if c['field'] == 'organization_id'
178
+ code = c['value']
179
+ next if code.empty?
180
+ next if %r{^[0-9]+$}.match code
181
+
182
+ search = Readiness::Zendesk::Search.organizations(@zendesk_client, "salesforce_id:#{code}")
183
+ if search.count == 1
184
+ trigger['conditions'][type][i]['value'] = search.first.id.to_s
185
+ end
186
+ end
177
187
  if c['field'] == 'satisfaction_reason_code'
178
188
  reason = Readiness::Zendesk::SatisfactionReasons.find_by_name(@zendesk_client, c['value'], @satisfaction_reasons)
179
189
  unless reason.nil?
@@ -226,6 +236,16 @@ module Readiness
226
236
  end
227
237
  end
228
238
  trigger['actions'].each_with_index do |a, i|
239
+ if a['field'] == 'organization_id'
240
+ code = a['value']
241
+ next if code.empty?
242
+ next if %r{^[0-9]+$}.match code
243
+
244
+ search = Readiness::Zendesk::Search.organizations(@zendesk_client, "salesforce_id:#{code}")
245
+ if search.count == 1
246
+ trigger['actions'][i]['value'][0] = search.first.id.to_s
247
+ end
248
+ end
229
249
  if a['field'] == 'notification_target'
230
250
  if a['value'].first =~ /^Target\:\ /
231
251
  name = a['value'].first.split('Target: ').last
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_support_readiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.109
4
+ version: 1.0.111
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Colyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-29 00:00:00.000000000 Z
11
+ date: 2025-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport