@task()
@timeit
def escalate_question(question_id):
 from kitsune.questions.models import Question
 question = Question.objects.get(id=question_id)
 url = 'https://{domain}{url}'.format(domain=Site.objects.get_current().domain, url=question.get_absolute_url())
 try:
  submit_ticket(email='support@mozilla.com', category='Escalated', subject=u'[Escalated] {title}'.format(title=question.title), body=u'{url}\n\n{content}'.format(url=url, content=question.content), tags=[t.slug for t in question.tags.all()])
 except ZendeskError:
  raise PickleableZendeskError()

@ task ( ) @ timeit def escalate_question ( question_id ) : from kitsune . questions . models import Question question = Question . objects . get ( id = question_id ) url = 'https://{domain}{url}' . format ( domain = Site . objects . get_current ( ) . domain , url = question . get_absolute_url ( ) ) try : submit_ticket ( email = 'support@mozilla.com' , category = 'Escalated' , subject = u'[Escalated] {title}' . format ( title = question . title ) , body = u'{url}\n\n{content}' . format ( url = url , content = question . content ) , tags = [ t . slug for t in question . tags . all ( ) ] ) except ZendeskError : raise PickleableZendeskError ( )
escalate a question to zendesk by submitting a ticket .