gitlab_support_readiness 1.0.41 → 1.0.43
Sign up to get free protection for your applications and to get access to all the features.
- 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/zendesk/tickets.rb +3 -1
- data/lib/support_readiness.rb +1 -0
- metadata +59 -2
@@ -0,0 +1,221 @@
|
|
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 GratisSupportOther within the module {Readiness::Zendesk}.
|
9
|
+
#
|
10
|
+
# @author Jason Colyer
|
11
|
+
# @since 1.0.42
|
12
|
+
class GratisSupportOther < Readiness::Client
|
13
|
+
##
|
14
|
+
# Process a Gratis Support Other 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 Support Leadership approved situation'
|
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
|
+
end
|
50
|
+
errors.push('Invalid manager handle given') if manager.nil?
|
51
|
+
end
|
52
|
+
|
53
|
+
##
|
54
|
+
# Sets the global variable requester
|
55
|
+
#
|
56
|
+
# @author Jason Colyer
|
57
|
+
# @since 1.0.42
|
58
|
+
def self.requester
|
59
|
+
@requester ||= Readiness::SupportSuperFormProcessor::Shared.gitlab_user_check(@gitlab_admin_client, requester_email)
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Sets the global variable requester_email
|
64
|
+
#
|
65
|
+
# @author Jason Colyer
|
66
|
+
# @since 1.0.42
|
67
|
+
def self.requester_email
|
68
|
+
@requester_email ||= ENV.fetch('REQUESTER_EMAIL')
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# Sets the global variable project
|
73
|
+
#
|
74
|
+
# @author Jason Colyer
|
75
|
+
# @since 1.0.42
|
76
|
+
def self.project
|
77
|
+
@project ||= Readiness::GitLab::Projects.find!(@gitlab_client, 12811526)
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# Sets the global variable sfdc_account_id
|
82
|
+
#
|
83
|
+
# @author Jason Colyer
|
84
|
+
# @since 1.0.42
|
85
|
+
def self.sfdc_account_id
|
86
|
+
@sfdc_account_id ||= determine_sfdc_account_id
|
87
|
+
end
|
88
|
+
|
89
|
+
##
|
90
|
+
# Determines the SFDC Account ID based off of the link given
|
91
|
+
#
|
92
|
+
# @author Jason Colyer
|
93
|
+
# @since 1.0.42
|
94
|
+
def self.determine_sfdc_account_id
|
95
|
+
link = ENV.fetch('GRATUS_SUPPORT_SFDC_ACCOUNT')
|
96
|
+
return link.split('/')[-2] if link =~ /lightning/
|
97
|
+
|
98
|
+
link.split('/').last
|
99
|
+
end
|
100
|
+
|
101
|
+
##
|
102
|
+
# Sets the global variable sfdc_account
|
103
|
+
#
|
104
|
+
# @author Jason Colyer
|
105
|
+
# @since 1.0.42
|
106
|
+
def self.sfdc_account
|
107
|
+
@sfdc_account ||= fetch_sfdc_account
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Gets the SFDC Account information
|
112
|
+
#
|
113
|
+
# @author Jason Colyer
|
114
|
+
# @since 1.0.42
|
115
|
+
def self.fetch_sfdc_account
|
116
|
+
query = Readiness::Salesforce::Queries.new(account_query)
|
117
|
+
results = Readiness::Salesforce::Queries.run!(@sfdc_client, query)
|
118
|
+
results.first
|
119
|
+
end
|
120
|
+
|
121
|
+
##
|
122
|
+
# Sets the global variable justification
|
123
|
+
#
|
124
|
+
# @author Jason Colyer
|
125
|
+
# @since 1.0.42
|
126
|
+
def self.justification
|
127
|
+
@justification ||= ENV.fetch('GRATUS_SUPPORT_JUSTIFICATION')
|
128
|
+
end
|
129
|
+
|
130
|
+
def self.slack_link
|
131
|
+
@slack_link ||= ENV.fetch('GRATIS_SUPPORT_SLACK_URL')
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Returns a SOQL query string to get Account info
|
136
|
+
#
|
137
|
+
# @author Jason Colyer
|
138
|
+
# @since 1.0.42
|
139
|
+
def self.account_query
|
140
|
+
<<~STRING
|
141
|
+
SELECT
|
142
|
+
Account.Account_ID_18__c,
|
143
|
+
Account.Name,
|
144
|
+
Account.Type
|
145
|
+
FROM Account
|
146
|
+
WHERE
|
147
|
+
Account.Account_ID_18__c = '#{sfdc_account_id}'
|
148
|
+
STRING
|
149
|
+
end
|
150
|
+
|
151
|
+
##
|
152
|
+
# Returns a string for the errors block
|
153
|
+
#
|
154
|
+
# @author Jason Colyer
|
155
|
+
# @since 1.0.42
|
156
|
+
def self.errors_block
|
157
|
+
return '' if errors.count.zero?
|
158
|
+
|
159
|
+
<<~STRING
|
160
|
+
## Attention @jcolyer and @#{requester.username}
|
161
|
+
|
162
|
+
The following problems were detected in the form submission:
|
163
|
+
|
164
|
+
#{errors.map { |e| "- #{e}" }.join("\n")}
|
165
|
+
|
166
|
+
These will need to be corrected to proceed. Please communicate via issue comments to work this out.
|
167
|
+
STRING
|
168
|
+
end
|
169
|
+
|
170
|
+
##
|
171
|
+
# Returns a string for the issue body
|
172
|
+
#
|
173
|
+
# @author Jason Colyer
|
174
|
+
# @since 1.0.42
|
175
|
+
def self.message
|
176
|
+
<<~STRING
|
177
|
+
## Gratis Support Request for a Support Leadership approved situation
|
178
|
+
|
179
|
+
- Requester: @#{requester.username}
|
180
|
+
- Approver: @#{manager.nil? ? manager_handle : manager.username}
|
181
|
+
- SFDC Account: #{sfdc_account.nil? ? sfdc_account_id : sfdc_account.Account_ID_18__c}
|
182
|
+
- Slack link containing support leadership approval: #{slack_link}
|
183
|
+
- Justification:
|
184
|
+
|
185
|
+
```
|
186
|
+
#{justification}
|
187
|
+
```
|
188
|
+
|
189
|
+
#{errors_block}
|
190
|
+
|
191
|
+
## @#{requester.username} TODO
|
192
|
+
|
193
|
+
- [ ] Look over the issue and confirm all data is correct
|
194
|
+
- [ ] Work with the approver on their TODO section
|
195
|
+
|
196
|
+
## @#{manager.nil? ? manager_handle : manager.username} TODO
|
197
|
+
|
198
|
+
- [ ] Review the request and check this box to approve the request
|
199
|
+
- If you are not approving it, please add a comment explaining why and close the issue.
|
200
|
+
- [ ] Add a comment signaling your approval (this let's the assignees know the issue is ready to proceed).
|
201
|
+
- 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.
|
202
|
+
|
203
|
+
## Support Readiness TODO
|
204
|
+
|
205
|
+
- [ ] Review the above information for accuracy
|
206
|
+
- [ ] 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
|
207
|
+
- [ ] Ensure the approver has checked the above box to signal approval
|
208
|
+
- [ ] Implement this as per [our documentation](https://handbook.gitlab.com/handbook/support/readiness/operations/docs/policies/gratis_support/#extensions)
|
209
|
+
|
210
|
+
/assign @jcolyer
|
211
|
+
|
212
|
+
/cc @#{requester.username} @#{manager.nil? ? manager_handle : manager.username}
|
213
|
+
|
214
|
+
/label ~"Readiness Priority::Current Quarter" ~"Readiness::Consulting" ~"Zendesk::Global" ~"Support-Ops-Category::Orgs and Users" ~"Gratis Support Request::Other"
|
215
|
+
|
216
|
+
/due in 72 hours
|
217
|
+
STRING
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
@@ -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 GratisSupportProspect within the module {Readiness::Zendesk}.
|
9
|
+
#
|
10
|
+
# @author Jason Colyer
|
11
|
+
# @since 1.0.42
|
12
|
+
class GratisSupportProspect < Readiness::Client
|
13
|
+
##
|
14
|
+
# Process a Gratis Support Prospect 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 Prospect'
|
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 != 'Prospect'
|
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 customer_email
|
176
|
+
#
|
177
|
+
# @author Jason Colyer
|
178
|
+
# @since 1.0.42
|
179
|
+
def self.customer_email
|
180
|
+
@customer_email ||= ENV.fetch('GRATIS_SUPPORT_CUSTOMER_EMAIL')
|
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 Prospect
|
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
|
+
- Email of customer who will be filing tickets: #{customer_email}
|
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::Priority Prospects"
|
282
|
+
|
283
|
+
/due in 72 hours
|
284
|
+
STRING
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|