gitlab_support_readiness 1.0.41 → 1.0.42
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/mailgun/client.rb +2 -1
- data/lib/support_readiness/mailgun/emails.rb +1 -1
- data/lib/support_readiness/support_super_form_processor/create_article.rb +375 -0
- data/lib/support_readiness/support_super_form_processor/create_macro.rb +183 -0
- data/lib/support_readiness/support_super_form_processor/edit_macro.rb +161 -0
- data/lib/support_readiness/support_super_form_processor/enable_us_government.rb +236 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_billing_entity_change.rb +218 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_extension.rb +238 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_investigate.rb +238 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_link.rb +213 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_nfr.rb +224 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_reset_seat_qsr.rb +194 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_trials_edit.rb +198 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_trials_extension.rb +228 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_trials_over_plan.rb +219 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_hackerone_license.rb +172 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_oem_license.rb +241 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_order_management.rb +267 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_other.rb +137 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_provison_failure.rb +179 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_did_not_receive.rb +191 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_multiyear.rb +188 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_nfr.rb +215 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_resend.rb +188 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_scl.rb +194 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_temp.rb +234 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_sm_trials_edit.rb +203 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_sm_trials_extension.rb +233 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_sm_trials_new.rb +223 -0
- data/lib/support_readiness/support_super_form_processor/global_ir_wider_community_license.rb +247 -0
- data/lib/support_readiness/support_super_form_processor/global_set_collaboration_id.rb +151 -0
- data/lib/support_readiness/support_super_form_processor/global_set_org_ase.rb +293 -0
- data/lib/support_readiness/support_super_form_processor/global_toggle_escalation.rb +142 -0
- data/lib/support_readiness/support_super_form_processor/gratis_support_extension.rb +247 -0
- data/lib/support_readiness/support_super_form_processor/gratis_support_former_customer.rb +288 -0
- data/lib/support_readiness/support_super_form_processor/gratis_support_migration.rb +238 -0
- data/lib/support_readiness/support_super_form_processor/gratis_support_other.rb +221 -0
- data/lib/support_readiness/support_super_form_processor/gratis_support_prospect.rb +288 -0
- data/lib/support_readiness/support_super_form_processor/gratis_support_upgrade.rb +298 -0
- data/lib/support_readiness/support_super_form_processor/namespace_availability.rb +213 -0
- data/lib/support_readiness/support_super_form_processor/pd_shadow_modification.rb +189 -0
- data/lib/support_readiness/support_super_form_processor/sa_request_for_support.rb +214 -0
- data/lib/support_readiness/support_super_form_processor/shared.rb +518 -0
- data/lib/support_readiness/support_super_form_processor/team_member_license.rb +144 -0
- data/lib/support_readiness/support_super_form_processor/two_fa_exemption.rb +260 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_order_management.rb +252 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_other.rb +136 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_did_not_receive.rb +162 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_multiyear.rb +159 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_nfr.rb +196 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_resend.rb +159 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_scl.rb +160 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_temp.rb +219 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_trials_edit.rb +189 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_trials_extension.rb +219 -0
- data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_trials_new.rb +209 -0
- data/lib/support_readiness/support_super_form_processor/usgov_set_collaboration_id.rb +151 -0
- data/lib/support_readiness/support_super_form_processor/usgov_set_org_ase.rb +295 -0
- data/lib/support_readiness/support_super_form_processor.rb +67 -0
- data/lib/support_readiness.rb +1 -0
- metadata +59 -2
@@ -0,0 +1,288 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Defines the module Readiness.
|
4
|
+
module Readiness
|
5
|
+
# Defines the module SupportSuperFormProcessor
|
6
|
+
module SupportSuperFormProcessor
|
7
|
+
##
|
8
|
+
# Defines the class GratisSupportFormerCustomer within the module {Readiness::Zendesk}.
|
9
|
+
#
|
10
|
+
# @author Jason Colyer
|
11
|
+
# @since 1.0.42
|
12
|
+
class GratisSupportFormerCustomer < Readiness::Client
|
13
|
+
##
|
14
|
+
# Process a Gratis Support Former Customer request
|
15
|
+
#
|
16
|
+
# @author Jason Colyer
|
17
|
+
# @since 1.0.42
|
18
|
+
def self.process!(gitlab_client, gitlab_admin_client, sfdc_client)
|
19
|
+
@gitlab_client = gitlab_client
|
20
|
+
@gitlab_admin_client = gitlab_admin_client
|
21
|
+
@sfdc_client = sfdc_client
|
22
|
+
requester
|
23
|
+
checks
|
24
|
+
issue = Readiness::GitLab::Issues.new
|
25
|
+
issue.title = 'Gratis Support Request for a Former Customer'
|
26
|
+
issue.description = message
|
27
|
+
create = Readiness::GitLab::Issues.create!(@gitlab_client, project, issue)
|
28
|
+
puts "Issue created: #{create.web_url}"
|
29
|
+
exit 0
|
30
|
+
end
|
31
|
+
|
32
|
+
##
|
33
|
+
# Sets the global variable errors
|
34
|
+
#
|
35
|
+
# @author Jason Colyer
|
36
|
+
# @since 1.0.42
|
37
|
+
def self.errors
|
38
|
+
@errors ||= []
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Perform the checks for this request
|
43
|
+
#
|
44
|
+
# @author Jason Colyer
|
45
|
+
# @since 1.0.42
|
46
|
+
def self.checks
|
47
|
+
if sfdc_account.nil?
|
48
|
+
errors.push('Invalid SFDC account given')
|
49
|
+
else
|
50
|
+
errors.push('Incorrect SFDC account type') if sfdc_account.Type != 'Former Customer'
|
51
|
+
end
|
52
|
+
errors.push('Invalid SFDC opportunity given') if sfdc_opportunity.nil?
|
53
|
+
errors.push('Invalid manager handle given') if manager.nil?
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Sets the global variable requester
|
58
|
+
#
|
59
|
+
# @author Jason Colyer
|
60
|
+
# @since 1.0.42
|
61
|
+
def self.requester
|
62
|
+
@requester ||= Readiness::SupportSuperFormProcessor::Shared.gitlab_user_check(@gitlab_admin_client, requester_email)
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# Sets the global variable requester_email
|
67
|
+
#
|
68
|
+
# @author Jason Colyer
|
69
|
+
# @since 1.0.42
|
70
|
+
def self.requester_email
|
71
|
+
@requester_email ||= ENV.fetch('REQUESTER_EMAIL')
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Sets the global variable project
|
76
|
+
#
|
77
|
+
# @author Jason Colyer
|
78
|
+
# @since 1.0.42
|
79
|
+
def self.project
|
80
|
+
@project ||= Readiness::GitLab::Projects.find!(@gitlab_client, 12811526)
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Sets the global variable sfdc_account_id
|
85
|
+
#
|
86
|
+
# @author Jason Colyer
|
87
|
+
# @since 1.0.42
|
88
|
+
def self.sfdc_account_id
|
89
|
+
@sfdc_account_id ||= determine_sfdc_account_id
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
# Determines the SFDC Account ID based off of the link given
|
94
|
+
#
|
95
|
+
# @author Jason Colyer
|
96
|
+
# @since 1.0.42
|
97
|
+
def self.determine_sfdc_account_id
|
98
|
+
link = ENV.fetch('GRATUS_SUPPORT_SFDC_ACCOUNT')
|
99
|
+
return link.split('/')[-2] if link =~ /lightning/
|
100
|
+
|
101
|
+
link.split('/').last
|
102
|
+
end
|
103
|
+
|
104
|
+
##
|
105
|
+
# Sets the global variable sfdc_opportunity_id
|
106
|
+
#
|
107
|
+
# @author Jason Colyer
|
108
|
+
# @since 1.0.42
|
109
|
+
def self.sfdc_opportunity_id
|
110
|
+
@sfdc_account_id ||= determine_sfdc_opportunity_id
|
111
|
+
end
|
112
|
+
|
113
|
+
##
|
114
|
+
# Determines the SFDC Opportunity ID based off of the link given
|
115
|
+
#
|
116
|
+
# @author Jason Colyer
|
117
|
+
# @since 1.0.42
|
118
|
+
def self.determine_sfdc_opportunity_id
|
119
|
+
link = ENV.fetch('GRATIS_SUPPORT_SFDC_OPPORTUNITY')
|
120
|
+
return link.split('/')[-2] if link =~ /lightning/
|
121
|
+
|
122
|
+
link.split('/').last
|
123
|
+
end
|
124
|
+
|
125
|
+
##
|
126
|
+
# Sets the global variable sfdc_account
|
127
|
+
#
|
128
|
+
# @author Jason Colyer
|
129
|
+
# @since 1.0.42
|
130
|
+
def self.sfdc_account
|
131
|
+
@sfdc_account ||= fetch_sfdc_account
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Gets the SFDC Account information
|
136
|
+
#
|
137
|
+
# @author Jason Colyer
|
138
|
+
# @since 1.0.42
|
139
|
+
def self.fetch_sfdc_account
|
140
|
+
query = Readiness::Salesforce::Queries.new(account_query)
|
141
|
+
results = Readiness::Salesforce::Queries.run!(@sfdc_client, query)
|
142
|
+
results.first
|
143
|
+
end
|
144
|
+
|
145
|
+
##
|
146
|
+
# Sets the global variable sfdc_opportunity
|
147
|
+
#
|
148
|
+
# @author Jason Colyer
|
149
|
+
# @since 1.0.42
|
150
|
+
def self.sfdc_opportunity
|
151
|
+
@sfdc_opportunity ||= fetch_sfdc_opportunity
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# Gets the SFDC Opportunity information
|
156
|
+
#
|
157
|
+
# @author Jason Colyer
|
158
|
+
# @since 1.0.42
|
159
|
+
def self.fetch_sfdc_opportunity
|
160
|
+
query = Readiness::Salesforce::Queries.new(opportunity_query)
|
161
|
+
results = Readiness::Salesforce::Queries.run!(@sfdc_client, query)
|
162
|
+
results.first
|
163
|
+
end
|
164
|
+
|
165
|
+
##
|
166
|
+
# Sets the global variable justification
|
167
|
+
#
|
168
|
+
# @author Jason Colyer
|
169
|
+
# @since 1.0.42
|
170
|
+
def self.justification
|
171
|
+
@justification ||= ENV.fetch('GRATUS_SUPPORT_JUSTIFICATION')
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# Sets the global variable plan
|
176
|
+
#
|
177
|
+
# @author Jason Colyer
|
178
|
+
# @since 1.0.42
|
179
|
+
def self.plan
|
180
|
+
@plan ||= ENV.fetch('GRATIS_SUPPORT_NEW_SUB')
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# Returns a SOQL query string to get Account info
|
185
|
+
#
|
186
|
+
# @author Jason Colyer
|
187
|
+
# @since 1.0.42
|
188
|
+
def self.account_query
|
189
|
+
<<~STRING
|
190
|
+
SELECT
|
191
|
+
Account.Account_ID_18__c,
|
192
|
+
Account.Name,
|
193
|
+
Account.Type
|
194
|
+
FROM Account
|
195
|
+
WHERE
|
196
|
+
Account.Account_ID_18__c = '#{sfdc_account_id}'
|
197
|
+
STRING
|
198
|
+
end
|
199
|
+
|
200
|
+
##
|
201
|
+
# Returns a SOQL query string to get Opportunity info
|
202
|
+
#
|
203
|
+
# @author Jason Colyer
|
204
|
+
# @since 1.0.42
|
205
|
+
def self.opportunity_query
|
206
|
+
<<~STRING
|
207
|
+
SELECT
|
208
|
+
Opportunity.Id,
|
209
|
+
Opportunity.ARR__c
|
210
|
+
FROM Opportunity
|
211
|
+
WHERE
|
212
|
+
Opportunity.Id = '#{sfdc_opportunity_id}'
|
213
|
+
STRING
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# Returns a string for the errors block
|
218
|
+
#
|
219
|
+
# @author Jason Colyer
|
220
|
+
# @since 1.0.42
|
221
|
+
def self.errors_block
|
222
|
+
return '' if errors.count.zero?
|
223
|
+
|
224
|
+
<<~STRING
|
225
|
+
## Attention @jcolyer and @#{requester.username}
|
226
|
+
|
227
|
+
The following problems were detected in the form submission:
|
228
|
+
|
229
|
+
#{errors.map { |e| "- #{e}" }.join("\n")}
|
230
|
+
|
231
|
+
These will need to be corrected to proceed. Please communicate via issue comments to work this out.
|
232
|
+
STRING
|
233
|
+
end
|
234
|
+
|
235
|
+
##
|
236
|
+
# Returns a string for the issue body
|
237
|
+
#
|
238
|
+
# @author Jason Colyer
|
239
|
+
# @since 1.0.42
|
240
|
+
def self.message
|
241
|
+
<<~STRING
|
242
|
+
## Gratis Support Request for a Former Customer
|
243
|
+
|
244
|
+
- Requester: @#{requester.username}
|
245
|
+
- Approver: @#{manager.nil? ? manager_handle : manager.username}
|
246
|
+
- SFDC Account: #{sfdc_account.nil? ? sfdc_account_id : sfdc_account.Account_ID_18__c}
|
247
|
+
- SFDC Opportunity: #{sfdc_opportunity.nil? ? sfdc_opportunity_id : sfdc_opportunity.Id}
|
248
|
+
- ARR: #{sfdc_opportunity.nil? ? 'Unknown' : sfdc_opportunity.ARR__c}
|
249
|
+
- Plan customer is trialing: #{plan}
|
250
|
+
- Justification:
|
251
|
+
|
252
|
+
```
|
253
|
+
#{justification}
|
254
|
+
```
|
255
|
+
|
256
|
+
#{errors_block}
|
257
|
+
|
258
|
+
## @#{requester.username} TODO
|
259
|
+
|
260
|
+
- [ ] Look over the issue and confirm all data is correct
|
261
|
+
- [ ] Work with the approver on their TODO section
|
262
|
+
|
263
|
+
## @#{manager.nil? ? manager_handle : manager.username} TODO
|
264
|
+
|
265
|
+
- [ ] Review the request and check this box to approve the request
|
266
|
+
- If you are not approving it, please add a comment explaining why and close the issue.
|
267
|
+
- [ ] Add a comment signaling your approval (this let's the assignees know the issue is ready to proceed).
|
268
|
+
- Please note your comment must explicitly say that you approve this request. If that is not explict, you may be asked to state the approval explicitly.
|
269
|
+
|
270
|
+
## Support Readiness TODO
|
271
|
+
|
272
|
+
- [ ] Review the above information for accuracy
|
273
|
+
- [ ] Review [our documentation](https://handbook.gitlab.com/handbook/support/readiness/operations/docs/policies/gratis_support/#extensions) for this and ensure it passes all required checks/validations
|
274
|
+
- [ ] Ensure the approver has checked the above box to signal approval
|
275
|
+
- [ ] Implement this as per [our documentation](https://handbook.gitlab.com/handbook/support/readiness/operations/docs/policies/gratis_support/#extensions)
|
276
|
+
|
277
|
+
/assign @jcolyer
|
278
|
+
|
279
|
+
/cc @#{requester.username} @#{manager.nil? ? manager_handle : manager.username}
|
280
|
+
|
281
|
+
/label ~"Readiness Priority::Current Quarter" ~"Readiness::Consulting" ~"Zendesk::Global" ~"Support-Ops-Category::Orgs and Users" ~"Gratis Support Request::Former Customer"
|
282
|
+
|
283
|
+
/due in 72 hours
|
284
|
+
STRING
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
@@ -0,0 +1,238 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Defines the module Readiness.
|
4
|
+
module Readiness
|
5
|
+
# Defines the module SupportSuperFormProcessor
|
6
|
+
module SupportSuperFormProcessor
|
7
|
+
##
|
8
|
+
# Defines the class GratisSupportMigration within the module {Readiness::Zendesk}.
|
9
|
+
#
|
10
|
+
# @author Jason Colyer
|
11
|
+
# @since 1.0.42
|
12
|
+
class GratisSupportMigration < Readiness::Client
|
13
|
+
##
|
14
|
+
# Process a Gratis Support Migration request
|
15
|
+
#
|
16
|
+
# @author Jason Colyer
|
17
|
+
# @since 1.0.42
|
18
|
+
def self.process!(gitlab_client, gitlab_admin_client, sfdc_client)
|
19
|
+
@gitlab_client = gitlab_client
|
20
|
+
@gitlab_admin_client = gitlab_admin_client
|
21
|
+
@sfdc_client = sfdc_client
|
22
|
+
requester
|
23
|
+
checks
|
24
|
+
issue = Readiness::GitLab::Issues.new
|
25
|
+
issue.title = 'Gratis Support Request for a Migration Offerring'
|
26
|
+
issue.description = message
|
27
|
+
create = Readiness::GitLab::Issues.create!(@gitlab_client, project, issue)
|
28
|
+
puts "Issue created: #{create.web_url}"
|
29
|
+
exit 0
|
30
|
+
end
|
31
|
+
|
32
|
+
##
|
33
|
+
# Sets the global variable errors
|
34
|
+
#
|
35
|
+
# @author Jason Colyer
|
36
|
+
# @since 1.0.42
|
37
|
+
def self.errors
|
38
|
+
@errors ||= []
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Perform the checks for this request
|
43
|
+
#
|
44
|
+
# @author Jason Colyer
|
45
|
+
# @since 1.0.42
|
46
|
+
def self.checks
|
47
|
+
if sfdc_account.nil?
|
48
|
+
errors.push('Invalid SFDC account given')
|
49
|
+
else
|
50
|
+
errors.push('Incorrect SFDC account type') if sfdc_account.Type != 'Customer'
|
51
|
+
end
|
52
|
+
errors.push('Invalid manager handle given') if manager.nil?
|
53
|
+
end
|
54
|
+
|
55
|
+
##
|
56
|
+
# Sets the global variable requester
|
57
|
+
#
|
58
|
+
# @author Jason Colyer
|
59
|
+
# @since 1.0.42
|
60
|
+
def self.requester
|
61
|
+
@requester ||= Readiness::SupportSuperFormProcessor::Shared.gitlab_user_check(@gitlab_admin_client, requester_email)
|
62
|
+
end
|
63
|
+
|
64
|
+
##
|
65
|
+
# Sets the global variable requester_email
|
66
|
+
#
|
67
|
+
# @author Jason Colyer
|
68
|
+
# @since 1.0.42
|
69
|
+
def self.requester_email
|
70
|
+
@requester_email ||= ENV.fetch('REQUESTER_EMAIL')
|
71
|
+
end
|
72
|
+
|
73
|
+
##
|
74
|
+
# Sets the global variable project
|
75
|
+
#
|
76
|
+
# @author Jason Colyer
|
77
|
+
# @since 1.0.42
|
78
|
+
def self.project
|
79
|
+
@project ||= Readiness::GitLab::Projects.find!(@gitlab_client, 12811526)
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# Sets the global variable sfdc_account_id
|
84
|
+
#
|
85
|
+
# @author Jason Colyer
|
86
|
+
# @since 1.0.42
|
87
|
+
def self.sfdc_account_id
|
88
|
+
@sfdc_account_id ||= determine_sfdc_account_id
|
89
|
+
end
|
90
|
+
|
91
|
+
##
|
92
|
+
# Determines the SFDC Account ID based off of the link given
|
93
|
+
#
|
94
|
+
# @author Jason Colyer
|
95
|
+
# @since 1.0.42
|
96
|
+
def self.determine_sfdc_account_id
|
97
|
+
link = ENV.fetch('GRATUS_SUPPORT_SFDC_ACCOUNT')
|
98
|
+
return link.split('/')[-2] if link =~ /lightning/
|
99
|
+
|
100
|
+
link.split('/').last
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Sets the global variable sfdc_account
|
105
|
+
#
|
106
|
+
# @author Jason Colyer
|
107
|
+
# @since 1.0.42
|
108
|
+
def self.sfdc_account
|
109
|
+
@sfdc_account ||= fetch_sfdc_account
|
110
|
+
end
|
111
|
+
|
112
|
+
##
|
113
|
+
# Gets the SFDC Account information
|
114
|
+
#
|
115
|
+
# @author Jason Colyer
|
116
|
+
# @since 1.0.42
|
117
|
+
def self.fetch_sfdc_account
|
118
|
+
query = Readiness::Salesforce::Queries.new(account_query)
|
119
|
+
results = Readiness::Salesforce::Queries.run!(@sfdc_client, query)
|
120
|
+
results.first
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# Sets the global variable justification
|
125
|
+
#
|
126
|
+
# @author Jason Colyer
|
127
|
+
# @since 1.0.42
|
128
|
+
def self.justification
|
129
|
+
@justification ||= ENV.fetch('GRATUS_SUPPORT_JUSTIFICATION')
|
130
|
+
end
|
131
|
+
|
132
|
+
##
|
133
|
+
# Sets the global variable current_plan
|
134
|
+
#
|
135
|
+
# @author Jason Colyer
|
136
|
+
# @since 1.0.42
|
137
|
+
def self.current_plan
|
138
|
+
@current_plan ||= ENV.fetch('GRATIS_SUPPORT_CURRENT_SUB')
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Sets the global variable plan
|
143
|
+
#
|
144
|
+
# @author Jason Colyer
|
145
|
+
# @since 1.0.42
|
146
|
+
def self.plan
|
147
|
+
@plan ||= ENV.fetch('GRATIS_SUPPORT_NEW_SUB')
|
148
|
+
end
|
149
|
+
|
150
|
+
##
|
151
|
+
# Returns a SOQL query string to get Account info
|
152
|
+
#
|
153
|
+
# @author Jason Colyer
|
154
|
+
# @since 1.0.42
|
155
|
+
def self.account_query
|
156
|
+
<<~STRING
|
157
|
+
SELECT
|
158
|
+
Account.Account_ID_18__c,
|
159
|
+
Account.Name,
|
160
|
+
Account.Type
|
161
|
+
FROM Account
|
162
|
+
WHERE
|
163
|
+
Account.Account_ID_18__c = '#{sfdc_account_id}'
|
164
|
+
STRING
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# Returns a string for the errors block
|
169
|
+
#
|
170
|
+
# @author Jason Colyer
|
171
|
+
# @since 1.0.42
|
172
|
+
def self.errors_block
|
173
|
+
return '' if errors.count.zero?
|
174
|
+
|
175
|
+
<<~STRING
|
176
|
+
## Attention @jcolyer and @#{requester.username}
|
177
|
+
|
178
|
+
The following problems were detected in the form submission:
|
179
|
+
|
180
|
+
#{errors.map { |e| "- #{e}" }.join("\n")}
|
181
|
+
|
182
|
+
These will need to be corrected to proceed. Please communicate via issue comments to work this out.
|
183
|
+
STRING
|
184
|
+
end
|
185
|
+
|
186
|
+
##
|
187
|
+
# Returns a string for the issue body
|
188
|
+
#
|
189
|
+
# @author Jason Colyer
|
190
|
+
# @since 1.0.42
|
191
|
+
def self.message
|
192
|
+
<<~STRING
|
193
|
+
## Gratis Support Request for a Migration Offerring
|
194
|
+
|
195
|
+
- Requester: @#{requester.username}
|
196
|
+
- Approver: @#{manager.nil? ? manager_handle : manager.username}
|
197
|
+
- SFDC Account: #{sfdc_account.nil? ? sfdc_account_id : sfdc_account.Account_ID_18__c}
|
198
|
+
- Plan customer is currently on: #{current_plan}
|
199
|
+
- Plan customer is trialing: #{plan}
|
200
|
+
- Justification:
|
201
|
+
|
202
|
+
```
|
203
|
+
#{justification}
|
204
|
+
```
|
205
|
+
|
206
|
+
#{errors_block}
|
207
|
+
|
208
|
+
## @#{requester.username} TODO
|
209
|
+
|
210
|
+
- [ ] Look over the issue and confirm all data is correct
|
211
|
+
- [ ] Work with the approver on their TODO section
|
212
|
+
|
213
|
+
## @#{manager.nil? ? manager_handle : manager.username} TODO
|
214
|
+
|
215
|
+
- [ ] Review the request and check this box to approve the request
|
216
|
+
- If you are not approving it, please add a comment explaining why and close the issue.
|
217
|
+
- [ ] Add a comment signaling your approval (this let's the assignees know the issue is ready to proceed).
|
218
|
+
- Please note your comment must explicitly say that you approve this request. If that is not explict, you may be asked to state the approval explicitly.
|
219
|
+
|
220
|
+
## Support Readiness TODO
|
221
|
+
|
222
|
+
- [ ] Review the above information for accuracy
|
223
|
+
- [ ] Review [our documentation](https://handbook.gitlab.com/handbook/support/readiness/operations/docs/policies/gratis_support/#extensions) for this and ensure it passes all required checks/validations
|
224
|
+
- [ ] Ensure the approver has checked the above box to signal approval
|
225
|
+
- [ ] Implement this as per [our documentation](https://handbook.gitlab.com/handbook/support/readiness/operations/docs/policies/gratis_support/#extensions)
|
226
|
+
|
227
|
+
/assign @jcolyer
|
228
|
+
|
229
|
+
/cc @#{requester.username} @#{manager.nil? ? manager_handle : manager.username}
|
230
|
+
|
231
|
+
/label ~"Readiness Priority::Current Quarter" ~"Readiness::Consulting" ~"Zendesk::Global" ~"Support-Ops-Category::Orgs and Users" ~"Gratis Support Request::Migration Offerring"
|
232
|
+
|
233
|
+
/due in 72 hours
|
234
|
+
STRING
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|