gitlab_support_readiness 1.0.109 → 1.0.110
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 +4 -4
- data/lib/support_readiness/repos/triggers.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcaad3ddf5dae80d44628c64919b1816fdcf5b9f55bcaf16be572abda1d39f40
|
4
|
+
data.tar.gz: a4e96419eda25a20c671d05ad98b4b368bd32a9585eb3d078cfdfb8f670100c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0f612510cf7978298d2efdd89c7f7472c8662a5de27be23a81ad4bcf6741ef3265cb9c6ce74d4c0cd843895f17ead184c7dc2a12468b7fa22a115a878007536
|
7
|
+
data.tar.gz: e0541f1e0afc68ae449e67511d929a77eda037d5e9c5b29bd81eee49e15bc91748ba7447a905b60684125fd1e6b2def101746071241b7471129db6eebac73614
|
@@ -174,6 +174,15 @@ 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 unless code.to_i.zero?
|
180
|
+
|
181
|
+
search = Readiness::Zendesk::Search.organizations(@zendesk_client, "salesforce_id:#{code}")
|
182
|
+
if search.count == 1
|
183
|
+
trigger['conditions'][type][i]['value'] = search.first.id.to_s
|
184
|
+
end
|
185
|
+
end
|
177
186
|
if c['field'] == 'satisfaction_reason_code'
|
178
187
|
reason = Readiness::Zendesk::SatisfactionReasons.find_by_name(@zendesk_client, c['value'], @satisfaction_reasons)
|
179
188
|
unless reason.nil?
|
@@ -226,6 +235,13 @@ module Readiness
|
|
226
235
|
end
|
227
236
|
end
|
228
237
|
trigger['actions'].each_with_index do |a, i|
|
238
|
+
if a['field'] == 'organization_id'
|
239
|
+
code = a['value']
|
240
|
+
search = Readiness::Zendesk::Search.organizations(@zendesk_client, "salesforce_id:#{code}")
|
241
|
+
if search.count == 1
|
242
|
+
trigger['actions'][i]['value'][0] = search.first.id.to_s
|
243
|
+
end
|
244
|
+
end
|
229
245
|
if a['field'] == 'notification_target'
|
230
246
|
if a['value'].first =~ /^Target\:\ /
|
231
247
|
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.
|
4
|
+
version: 1.0.110
|
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-
|
11
|
+
date: 2025-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|