зеркало из https://github.com/mozilla/kitsune.git
Коммит
c71789150e
|
@ -135,3 +135,7 @@ app:
|
|||
zendesk_api_token: SECRET
|
||||
zendesk_user_email: SECRET
|
||||
zendesk_subdomain: SECRET
|
||||
zendesk_ticket_form_id: 360000417171
|
||||
zendesk_product_field_id: 360047198211
|
||||
zendesk_category_field_id: 360047206172
|
||||
zendesk_os_field_id: 360018604871
|
||||
|
|
|
@ -134,3 +134,7 @@ app:
|
|||
zendesk_api_token: SECRET
|
||||
zendesk_user_email: SECRET
|
||||
zendesk_subdomain: SECRET
|
||||
zendesk_ticket_form_id: 360000417171
|
||||
zendesk_product_field_id: 360047198211
|
||||
zendesk_category_field_id: 360047206172
|
||||
zendesk_os_field_id: 360018604871
|
|
@ -5,13 +5,7 @@ from zenpy.lib.api_objects import Identity as ZendeskIdentity
|
|||
from zenpy.lib.api_objects import Ticket
|
||||
from zenpy.lib.api_objects import User as ZendeskUser
|
||||
|
||||
TICKET_FORM_ID = 360000417171
|
||||
|
||||
# See docs/zendesk.md for details about getting the valid choice values for each field:
|
||||
|
||||
PRODUCT_FIELD_ID = 360047198211
|
||||
|
||||
CATEGORY_FIELD_ID = 360047206172
|
||||
CATEGORY_CHOICES = [
|
||||
(None, _lazy("Select a topic")),
|
||||
("technical", _lazy("Technical")),
|
||||
|
@ -20,7 +14,6 @@ CATEGORY_CHOICES = [
|
|||
("troubleshooting", _lazy("Troubleshooting")),
|
||||
]
|
||||
|
||||
OS_FIELD_ID = 360018604871
|
||||
OS_CHOICES = [
|
||||
(None, _lazy("Select platform")),
|
||||
("win10", _lazy("Windows")),
|
||||
|
@ -93,11 +86,11 @@ class ZendeskClient(object):
|
|||
ticket = Ticket(
|
||||
subject=subject,
|
||||
comment={"body": description},
|
||||
ticket_form_id=TICKET_FORM_ID,
|
||||
ticket_form_id=settings.ZENDESK_TICKET_FORM_ID,
|
||||
custom_fields=[
|
||||
{"id": PRODUCT_FIELD_ID, "value": product},
|
||||
{"id": CATEGORY_FIELD_ID, "value": category},
|
||||
{"id": OS_FIELD_ID, "value": os},
|
||||
{"id": settings.ZENDESK_PRODUCT_FIELD_ID, "value": product},
|
||||
{"id": settings.ZENDESK_CATEGORY_FIELD_ID, "value": category},
|
||||
{"id": settings.ZENDESK_OS_FIELD_ID, "value": os},
|
||||
],
|
||||
)
|
||||
if user.profile.zendesk_id:
|
||||
|
|
|
@ -1205,3 +1205,8 @@ if ES7_ENABLE_CONSOLE_LOGGING and DEV:
|
|||
ZENDESK_SUBDOMAIN = config("ZENDESK_SUBDOMAIN", default="")
|
||||
ZENDESK_API_TOKEN = config("ZENDESK_API_TOKEN", default="")
|
||||
ZENDESK_USER_EMAIL = config("ZENDESK_USER_EMAIL", default="")
|
||||
# TODO: switch to prod when available
|
||||
ZENDESK_TICKET_FORM_ID = config("ZENDESK_TICKET_FORM_ID", default="360000417171", cast=int)
|
||||
ZENDESK_PRODUCT_FIELD_ID = config("ZENDESK_PRODUCT_FIELD_ID", default="360047198211", cast=int)
|
||||
ZENDESK_CATEGORY_FIELD_ID = config("ZENDESK_CATEGORY_FIELD_ID", default="360047206172", cast=int)
|
||||
ZENDESK_OS_FIELD_ID = config("ZENDESK_OS_FIELD_ID", default="360018604871", cast=int)
|
||||
|
|
Загрузка…
Ссылка в новой задаче