Commit d4690a67 authored by Rafael Monnerat's avatar Rafael Monnerat

feature/ticket-workflow-improvements

See merge request !327
parents 0267d789 e3999c18
Pipeline #16931 failed with stage
in 0 seconds
ticket = sci['object']
kw = sci['kwargs']
event = ticket.Ticket_getCausalityValue()
event.Event_createResponse(
response_event_portal_type=kw['response_event_portal_type'],
response_event_resource=kw['response_event_resource'],
response_event_title=kw.get('response_event_title'),
response_event_text_content=kw.get('response_event_text_content'),
response_event_start_date=kw['response_event_start_date'],
response_workflow_action=kw['response_workflow_action'],
response_event_notification_message=kw['response_event_notification_message'],
default_destination=kw['default_destination'],
response_event_content_type=kw['response_event_content_type'])
ticket.suspend()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>sci</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>script_createResponseAndSuspend</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Suspended</string> </value>
<value> <string>User Assigned</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -17,6 +17,7 @@
<value>
<tuple>
<string>destination/portal_workflow/ticket_workflow/transition_create_response_and_invalidate_action</string>
<string>destination/portal_workflow/ticket_workflow/transition_create_response_and_suspend_action</string>
<string>destination/portal_workflow/ticket_workflow/transition_invalidate</string>
<string>destination/portal_workflow/ticket_workflow/transition_invalidate_action</string>
<string>destination/portal_workflow/ticket_workflow/transition_suspend</string>
......@@ -50,7 +51,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Opened</string> </value>
<value> <string>Operator Assigned</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Transition" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>%(content_url)s/Ticket_viewCreateResponseWorkflowActionDialog?workflow_action=create_response_and_suspend_action</string> </value>
</item>
<item>
<key> <string>action_name</string> </key>
<value> <string>Create Response and Assign to User</string> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/workflow</string>
<string>before_script/portal_workflow/ticket_workflow/script_checkConsistency</string>
<string>after_script/portal_workflow/ticket_workflow/script_createResponseAndInvalidate</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Create an response and mark the ticket as suspended in the same time.</string> </value>
</item>
<item>
<key> <string>guard_expression</string> </key>
<value> <string>python: here.Ticket_getCausalityValue() is not None</string> </value>
</item>
<item>
<key> <string>guard_group</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>guard_permission</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>guard_role</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
</tuple>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transition_create_response_and_suspend_action</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Transition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Create Response and Assign to User Action</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>action_name</string> </key>
<value> <string>Suspend Ticket</string> </value>
<value> <string>Assign to User</string> </value>
</item>
<item>
<key> <string>categories</string> </key>
......@@ -65,7 +65,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Suspend Ticket Action</string> </value>
<value> <string>Assign to User Action</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
......
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>action_name</string> </key>
<value> <string>Open Ticket</string> </value>
<value> <string>Assign to Operator</string> </value>
</item>
<item>
<key> <string>categories</string> </key>
......@@ -64,7 +64,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Open Ticket Action</string> </value>
<value> <string>Assign to Operator Action</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
......
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