Commit 721394d9 authored by Romain Courteaud's avatar Romain Courteaud

Use template to initialize the ticket.

parent b58a0201
......@@ -64,10 +64,15 @@ ticket_relative_url = integration_site.getCategoryFromMapping(\'SourceProject/%s
if ticket_relative_url != \'source_project/%s\' % context.getId().replace(\'-\', \'_\'):\n
ticket = portal.restrictedTraverse(ticket_relative_url)\n
else:\n
ticket = portal.support_request_module.newContent(\n
portal_type=\'Support Request\',\n
support_request_template = portal.restrictedTraverse(\n
portal.portal_preferences.getPreferredSupportRequestTemplate())\n
ticket = support_request_template.Base_createCloneDocument(batch_mode=1)\n
ticket.edit(\n
source_project_value=context,\n
title=\'Payzen Transaction to check\',\n
title=\'Payzen Transaction to check for "%s"\' % context.getDestinationSectionTitle(),\n
destination_decision_value=context.getDestinationSectionValue(),\n
start_date=DateTime(),\n
resource=portal.portal_preferences.getPreferredSupportRequestResource(),\n
)\n
ticket.validate(comment=\'New automatic ticket for %s\' % context.getTitle())\n
\n
......
......@@ -64,6 +64,8 @@ site_message = portal.event_module.newContent(\n
destination_value=context.getDestinationSectionValue(),\n
follow_up=ticket.getRelativeUrl(),\n
source_value=context.getSourceSectionValue(),\n
resource=ticket.getResource(),\n
title="Payment requested",\n
# XXX Hardcoded script provided by another bt5\n
text_content=\'Please pay your payment by clicking <a \'\\\n
\'href="%s/PaymentTransaction_redirectToManualPayzenPayment">here</a>.\' % \\\n
......
98
\ No newline at end of file
99
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment