Commit b4b5bcf8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use event_simulation_workflow instead of event_workflow for Event-type portal types.

you can use portal_alarms/upgrader_migrate_event_workflow_history for migration.
parent ac94d0d9
......@@ -9,15 +9,15 @@
</chain>
<chain>
<type>Fax Message</type>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_workflow, pricing_interaction_workflow</workflow>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_simulation_workflow, pricing_interaction_workflow</workflow>
</chain>
<chain>
<type>Letter</type>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_workflow, pricing_interaction_workflow</workflow>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_simulation_workflow, pricing_interaction_workflow</workflow>
</chain>
<chain>
<type>Mail Message</type>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_workflow, pricing_interaction_workflow</workflow>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_simulation_workflow, pricing_interaction_workflow</workflow>
</chain>
<chain>
<type>Meeting</type>
......@@ -25,11 +25,11 @@
</chain>
<chain>
<type>Note</type>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_workflow, pricing_interaction_workflow</workflow>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_simulation_workflow, pricing_interaction_workflow</workflow>
</chain>
<chain>
<type>Phone Call</type>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_workflow, pricing_interaction_workflow</workflow>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_simulation_workflow, pricing_interaction_workflow</workflow>
</chain>
<chain>
<type>Sale Opportunity</type>
......@@ -37,11 +37,11 @@
</chain>
<chain>
<type>Short Message</type>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_workflow, pricing_interaction_workflow</workflow>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_simulation_workflow, pricing_interaction_workflow</workflow>
</chain>
<chain>
<type>Site Message</type>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_workflow</workflow>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_simulation_workflow</workflow>
</chain>
<chain>
<type>Support Request</type>
......@@ -49,10 +49,10 @@
</chain>
<chain>
<type>Visit</type>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_workflow, pricing_interaction_workflow</workflow>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_simulation_workflow, pricing_interaction_workflow</workflow>
</chain>
<chain>
<type>Web Message</type>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_workflow, pricing_interaction_workflow</workflow>
<workflow>document_conversion_interaction_workflow, edit_workflow, event_interaction_workflow, event_simulation_workflow, pricing_interaction_workflow</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
......@@ -61,10 +61,9 @@ request_stop_date = request.get(\'at_date\', None)\n
request_ticket_type = request.get(\'campaign_type\', None)\n
request_validation_state = request.get(\'validation_state\', None)\n
\n
outgoing_state_list = portal.Event_getOutgoingStateList()\n
incoming_state_list = portal.Event_getIncomingStateList()\n
outgoing_title=portal.Base_translateString("Outgoing")\n
incoming_title=portal.Base_translateString("Incoming")\n
future_state_list = portal.Event_getFutureStateList()\n
past_state_list = portal.Event_getPastStateList()\n
past_title=portal.Base_translateString("past")\n
\n
line_list = []\n
\n
......@@ -90,10 +89,10 @@ ticketlist=portal.portal_catalog.searchResults(portal_type="Campaign",\n
# Get every result object\n
for r_ticket in ticketlist: \n
ticket=r_ticket.getObject()\n
#show outgoing follow-up events\n
#show future follow-up events\n
eventlist=portal.portal_catalog.searchResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=outgoing_state_list)\n
simulation_state=future_state_list)\n
#sort the list by destination (recipient)\n
eventlist_sorted=[]\n
for event in eventlist:\n
......@@ -102,7 +101,6 @@ for r_ticket in ticketlist: \n
for event in eventlist_sorted:\n
line_list.append( Object(uid=\'new_\',\n
campaign = ticket.getTitle(),\n
direction = outgoing_title,\n
type = event.getTranslatedPortalType(),\n
destination_title_list = event.getDestinationTitleList(),\n
title = event.getTitle(),\n
......@@ -110,22 +108,17 @@ for r_ticket in ticketlist: \n
start_date = event.getStartDate(),\n
source = event.getSourceTitle(),\n
validation_state = event.getTranslatedSimulationStateTitle()))\n
#show incoming or outgoing causality events of every outgoing event\n
#show past or future causality events of every future event\n
event_causality_list=portal.portal_catalog.searchResults(portal_type=\n
portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list+incoming_state_list,\n
simulation_state=future_state_list+past_state_list,\n
causality_uid=event.getUid())\n
for r_event_causality in event_causality_list:\n
event_causality=r_event_causality.getObject()\n
#check that one event it isn\'t related by causality and follow-up with the same ticket\n
if ticket.getUid()<>event_causality.getFollowUpUid():\n
if event_causality.getSimulationState() in incoming_state_list:\n
direction_state = incoming_title\n
else:\n
direction_state = outgoing_title\n
line_list.append( Object(uid=\'new_\',\n
campaign = "",\n
direction = direction_state,\n
type = event_causality.getTranslatedPortalType(),\n
destination_title_list = event_causality.getDestinationTitleList(),\n
title = event_causality.getTitle(),\n
......@@ -134,10 +127,10 @@ for r_ticket in ticketlist: \n
source = event_causality.getSourceTitle(),\n
validation_state = event_causality.getTranslatedSimulationStateTitle()))\n
\n
#show incoming follow-up events\n
#show past follow-up events\n
eventlist=portal.portal_catalog.searchResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=incoming_state_list)\n
simulation_state=past_state_list)\n
#sort the list by source\n
eventlist_sorted=[]\n
for event in eventlist:\n
......@@ -146,7 +139,6 @@ for r_ticket in ticketlist: \n
for event in eventlist_sorted:\n
line_list.append( Object(uid=\'new_\',\n
campaign = ticket.getTitle(),\n
direction = incoming_title,\n
type = event.getTranslatedPortalType(),\n
destination_title_list = event.getDestinationTitleList(),\n
title = event.getTitle(),\n
......@@ -154,22 +146,17 @@ for r_ticket in ticketlist: \n
start_date = event.getStartDate(),\n
source = event.getSourceTitle(),\n
validation_state = event.getTranslatedSimulationStateTitle()))\n
#show incoming or outgoing causality events of every incoming event\n
#show past or future causality events of every past event\n
event_causality_list=portal.portal_catalog.searchResults(portal_type=\n
portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list+incoming_state_list,\n
simulation_state=future_state_list+past_state_list,\n
causality_uid=event.getUid())\n
for r_event_causality in event_causality_list:\n
event_causality=r_event_causality.getObject()\n
#check that one event it isn\'t related by causality and follow-up with the same ticket\n
if ticket.getUid()<>event_causality.getFollowUpUid():\n
if event_causality.getSimulationState() in incoming_state_list:\n
direction_state = incoming_title\n
else:\n
direction_state = outgoing_title\n
line_list.append( Object(uid=\'new_\',\n
campaign = "",\n
direction = direction_state,\n
type = event_causality.getTranslatedPortalType(),\n
destination_title_list = event_causality.getDestinationTitleList(),\n
title = event_causality.getTitle(),\n
......
......@@ -62,9 +62,8 @@ request_ticket_type = request.get(\'campaign_type\', None)\n
request_validation_state = request.get(\'validation_state\', None)\n
request_section_category = request.get(\'section_category\', None)\n
\n
outgoing_finish_state_list = ["delivered"]\n
outgoing_state_list = portal.Event_getOutgoingStateList()\n
incoming_state_list = portal.Event_getIncomingStateList()\n
future_state_list = portal.Event_getFutureStateList()\n
past_state_list = portal.Event_getPastStateList()\n
\n
line_list = []\n
\n
......@@ -91,34 +90,27 @@ ticketlist=portal.portal_catalog.searchResults(portal_type="Campaign",\n
# Get every result object\n
for r_ticket in ticketlist:\n
ticket=r_ticket.getObject()\n
outgoing = 0\n
outgoing_finish = 0\n
incoming = 0.0\n
future = 0\n
past = 0.0\n
progression=0.0\n
efficiency=0.0\n
#count outgoing follow-up events\n
outgoing=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
#count future follow-up events\n
future=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=outgoing_state_list)[0][0])\n
#count incoming follow-up events\n
incoming=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
simulation_state=future_state_list)[0][0])\n
#count past follow-up events\n
past=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=incoming_state_list)[0][0])\n
#count outgoing follow-up delivered events\n
outgoing_finish=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=outgoing_finish_state_list)[0][0])\n
#count incoming causality events\n
incoming+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
simulation_state=past_state_list)[0][0])\n
#count past causality events\n
past+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
portal_type=portal.getPortalEventTypeList(),\n
simulation_state=incoming_state_list)[0][0])\n
#count outgoing causality events\n
outgoing+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
simulation_state=past_state_list)[0][0])\n
#count future causality events\n
future+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
portal_type=portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list)[0][0]) \n
if outgoing>0:\n
progression=float(100*outgoing_finish/outgoing)\n
efficiency=float(100*incoming/outgoing)\n
simulation_state=future_state_list)[0][0]) \n
if future>0:\n
progression=float(100*past/(past+future))\n
\n
line_list.append(Object(uid=\'new_\',\n
title = ticket.getTitle(),\n
......@@ -129,10 +121,10 @@ for r_ticket in ticketlist:\n
destination_decision = ticket.getDestinationDecisionTitle(),\n
source = ticket.getSourceTitle(),\n
validation_state = ticket.getTranslatedSimulationStateTitle(),\n
outgoing = outgoing,\n
incoming = incoming,\n
future = future,\n
past = past,\n
progression = progression / 100,\n
efficiency = efficiency / 100))\n
))\n
\n
if line_list == []:\n
line_list.append(Object(uid=\'new_\'))\n
......
......@@ -84,10 +84,6 @@
<string>campaign</string>
<string>Campaign</string>
</tuple>
<tuple>
<string>direction</string>
<string>Direction</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
......@@ -174,10 +170,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -86,7 +86,6 @@
<string>listbox_start_date</string>
<string>listbox_stop_date</string>
<string>listbox_progression</string>
<string>listbox_efficiency</string>
</list>
</value>
</item>
......
......@@ -354,21 +354,17 @@
<string>State</string>
</tuple>
<tuple>
<string>outgoing</string>
<string>Outgoing</string>
<string>future</string>
<string>Future Events</string>
</tuple>
<tuple>
<string>incoming</string>
<string>Incoming</string>
<string>past</string>
<string>Past Events</string>
</tuple>
<tuple>
<string>progression</string>
<string>Progression</string>
</tuple>
<tuple>
<string>efficiency</string>
<string>Efficiency</string>
</tuple>
</list>
</value>
</item>
......@@ -380,6 +376,10 @@
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -390,6 +390,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -420,10 +426,6 @@
<string>progression</string>
<string>Progression</string>
</tuple>
<tuple>
<string>efficiency</string>
<string>Efficiency</string>
</tuple>
</list>
</value>
</item>
......@@ -441,6 +443,10 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
......@@ -469,6 +475,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -533,6 +543,12 @@
<key> <string>stat_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Campaigns</string> </value>
......@@ -557,10 +573,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -80,7 +80,7 @@ if request_stop_date:\n
\n
#Get direction workfolow state list (simulation states)\n
for state in portal.Base_getTranslatedWorkflowStateItemList(\n
wf_id=\'event_workflow\'):\n
wf_id=\'event_simulation_workflow\'):\n
if state[1] in direction_state_list:\n
#count number of objects in state with request parameters\n
obj = Object(uid="new_")\n
......
......@@ -63,23 +63,23 @@ for ticket_type in context.getPortalTicketTypeList():\n
selection_columns.append((\'unassigned\', \'Unassigned\'))\n
selection_columns.append((\'total\', \'Total\'))\n
\n
#Incoming states\n
params=dict(direction=context.Event_getIncomingStateList())\n
#Future states\n
params=dict(direction=context.Event_getFutureStateList())\n
result.append(ReportSection(\n
path=context.getPhysicalPath(),\n
selection_columns=selection_columns,\n
listbox_display_mode=\'FlatListMode\',\n
title=context.Base_translateString(\'Incoming\'),\n
title=context.Base_translateString(\'Future Events\'),\n
selection_params=params,\n
form_id=\'EventModule_viewEventActivityList\'))\n
\n
#Outgoing states\n
params=dict(direction=context.Event_getOutgoingStateList())\n
#Past states\n
params=dict(direction=context.Event_getPastStateList())\n
result.append(ReportSection(\n
path=context.getPhysicalPath(),\n
selection_columns=selection_columns,\n
listbox_display_mode=\'FlatListMode\',\n
title=context.Base_translateString(\'Outgoing\'),\n
title=context.Base_translateString(\'Past Events\'),\n
selection_params=params,\n
form_id=\'EventModule_viewEventActivityList\'))\n
\n
......
......@@ -55,7 +55,7 @@
from Products.PythonScripts.standard import Object\n
request = container.REQUEST\n
portal = context.getPortalObject()\n
state_item_list=[x[1] for x in context.Base_getTranslatedWorkflowStateItemList(wf_id=\'event_workflow\')]\n
state_item_list=[x[1] for x in context.Base_getTranslatedWorkflowStateItemList(wf_id=\'event_simulation_workflow\')]\n
#remove deteted state\n
if \'deleted\' in state_item_list:\n
state_item_list.remove(\'deleted\')\n
......
......@@ -59,7 +59,7 @@ selection_columns.append((\'ticket_type\', \'Module\'))\n
selection_columns.append((\'resource\',\'Type\'))\n
#Add dynamicaly event states columns to the form\n
#The name of column must be without spaces\n
for event_state in context.Base_getWorkflowStateItemList(\'event_workflow\'):\n
for event_state in context.Base_getWorkflowStateItemList(\'event_simulation_workflow\'):\n
if event_state[1]!=\'deleted\':\n
selection_columns.append((event_state[1],event_state[0]))\n
selection_columns.append((\'total\', \'Total\'))\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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>_body</string> </key>
<value> <string>return [\'started\', \'stopped\', \'delivered\',]\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Event_getFutureStateList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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>_body</string> </key>
<value> <string>return [\'draft\', \'planned\', \'confirmed\',]\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Event_getPastStateList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -61,10 +61,8 @@ request_stop_date = request.get(\'at_date\', None)\n
request_ticket_type = request.get(\'meeting_type\', None)\n
request_validation_state = request.get(\'validation_state\', None)\n
\n
outgoing_state_list = portal.Event_getOutgoingStateList()\n
incoming_state_list = portal.Event_getIncomingStateList()\n
outgoing_title=portal.Base_translateString("Outgoing")\n
incoming_title=portal.Base_translateString("Incoming")\n
future_state_list = portal.Event_getFutureStateList()\n
past_state_list = portal.Event_getPastStateList()\n
\n
line_list = []\n
\n
......@@ -90,10 +88,10 @@ ticketlist=portal.portal_catalog.searchResults(portal_type="Meeting",\n
# Get every result object\n
for r_ticket in ticketlist: \n
ticket=r_ticket.getObject()\n
#show outgoing follow-up events\n
#show future follow-up events\n
eventlist=portal.portal_catalog.searchResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=outgoing_state_list)\n
simulation_state=future_state_list)\n
#sort the list by destination (recipient)\n
eventlist_sorted=[]\n
for event in eventlist:\n
......@@ -102,7 +100,6 @@ for r_ticket in ticketlist: \n
for event in eventlist_sorted:\n
line_list.append( Object(uid=\'new_\',\n
meeting = ticket.getTitle(),\n
direction = outgoing_title,\n
type = event.getTranslatedPortalType(),\n
destination_title_list = event.getDestinationTitleList(),\n
title = event.getTitle(),\n
......@@ -110,22 +107,17 @@ for r_ticket in ticketlist: \n
start_date = event.getStartDate(),\n
source = event.getSourceTitle(),\n
validation_state = event.getTranslatedSimulationStateTitle()))\n
#show incoming or outgoing causality events of every outgoing event\n
#show past or future causality events of every future event\n
event_causality_list=portal.portal_catalog.searchResults(portal_type=\n
portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list+incoming_state_list,\n
simulation_state=future_state_list+past_state_list,\n
causality_uid=event.getUid())\n
for r_event_causality in event_causality_list:\n
event_causality=r_event_causality.getObject()\n
#check that one event it isn\'t related by causality and follow-up with the same ticket\n
if ticket.getUid()<>event_causality.getFollowUpUid():\n
if event_causality.getSimulationState() in incoming_state_list:\n
direction_state = incoming_title\n
else:\n
direction_state = outgoing_title\n
line_list.append( Object(uid=\'new_\',\n
meeting = "",\n
direction = direction_state,\n
type = event_causality.getTranslatedPortalType(),\n
destination_title_list = event_causality.getDestinationTitleList(),\n
title = event_causality.getTitle(),\n
......@@ -134,10 +126,10 @@ for r_ticket in ticketlist: \n
source = event_causality.getSourceTitle(),\n
validation_state = event_causality.getTranslatedSimulationStateTitle()))\n
\n
#show incoming follow-up events\n
#show past follow-up events\n
eventlist=portal.portal_catalog.searchResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=incoming_state_list)\n
simulation_state=past_state_list)\n
#sort the list by source\n
eventlist_sorted=[]\n
for event in eventlist:\n
......@@ -146,7 +138,6 @@ for r_ticket in ticketlist: \n
for event in eventlist_sorted:\n
line_list.append( Object(uid=\'new_\',\n
meeting = ticket.getTitle(),\n
direction = incoming_title,\n
type = event.getTranslatedPortalType(),\n
destination_title_list = event.getDestinationTitleList(),\n
title = event.getTitle(),\n
......@@ -154,22 +145,17 @@ for r_ticket in ticketlist: \n
start_date = event.getStartDate(),\n
source = event.getSourceTitle(),\n
validation_state = event.getTranslatedSimulationStateTitle()))\n
#show incoming or outgoing causality events of every incoming event\n
#show past or future causality events of every past event\n
event_causality_list=portal.portal_catalog.searchResults(portal_type=\n
portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list+incoming_state_list,\n
simulation_state=future_state_list+past_state_list,\n
causality_uid=event.getUid())\n
for r_event_causality in event_causality_list:\n
event_causality=r_event_causality.getObject()\n
#check that one event it isn\'t related by causality and follow-up with the same ticket\n
if ticket.getUid()<>event_causality.getFollowUpUid():\n
if event_causality.getSimulationState() in incoming_state_list:\n
direction_state = incoming_title\n
else:\n
direction_state = outgoing_title\n
line_list.append( Object(uid=\'new_\',\n
meeting = "",\n
direction = direction_state,\n
type = event_causality.getTranslatedPortalType(),\n
destination_title_list = event_causality.getDestinationTitleList(),\n
title = event_causality.getTitle(),\n
......
......@@ -60,8 +60,8 @@ request_stop_date = request.get(\'at_date\', None)\n
request_ticket_type = request.get(\'meeting_type\', None)\n
request_validation_state = request.get(\'validation_state\', None)\n
\n
outgoing_state_list = portal.Event_getOutgoingStateList()\n
incoming_state_list = portal.Event_getIncomingStateList()\n
future_state_list = portal.Event_getFutureStateList()\n
past_state_list = portal.Event_getPastStateList()\n
\n
line_list = []\n
\n
......@@ -88,24 +88,24 @@ ticketlist=portal.portal_catalog.searchResults(portal_type="Meeting",\n
# Get every result object\n
for r_ticket in ticketlist:\n
ticket=r_ticket.getObject()\n
outgoing = 0\n
incoming = 0\n
#count outgoing follow-up events\n
outgoing=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
future = 0\n
past = 0\n
#count future follow-up events\n
future=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=outgoing_state_list)[0][0])\n
#count incoming follow-up events\n
incoming=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
simulation_state=future_state_list)[0][0])\n
#count past follow-up events\n
past=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=incoming_state_list)[0][0])\n
#count incoming causality events\n
incoming+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
simulation_state=past_state_list)[0][0])\n
#count past causality events\n
past+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
portal_type=portal.getPortalEventTypeList(),\n
simulation_state=incoming_state_list)[0][0])\n
#count outgoing causality events\n
outgoing+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
simulation_state=past_state_list)[0][0])\n
#count future causality events\n
future+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
portal_type=portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list)[0][0]) \n
simulation_state=future_state_list)[0][0]) \n
line_list.append(Object(uid=\'new_\',\n
title = ticket.getTitle(),\n
ticket_type = ticket.getResourceTranslatedTitle(),\n
......@@ -116,8 +116,8 @@ for r_ticket in ticketlist:\n
destination_title = ticket.getDestinationTitle(),\n
source = ticket.getSourceTitle(),\n
validation_state = ticket.getTranslatedSimulationStateTitle(),\n
outgoing = outgoing,\n
incoming = incoming))\n
future = future,\n
past = past))\n
\n
if line_list == []:\n
line_list.append(Object(uid=\'new_\'))\n
......
......@@ -325,10 +325,6 @@
<string>meeting</string>
<string>Meeting</string>
</tuple>
<tuple>
<string>direction</string>
<string>Direction</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
......@@ -368,6 +364,10 @@
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -378,6 +378,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -421,10 +427,18 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>0</int> </value>
......@@ -445,6 +459,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -465,6 +483,10 @@
<key> <string>report_tree</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
......@@ -505,10 +527,22 @@
<key> <string>stat_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Events</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......@@ -523,10 +557,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -358,12 +358,12 @@
<string>State</string>
</tuple>
<tuple>
<string>outgoing</string>
<string>Outgoing</string>
<string>future</string>
<string>Future Events</string>
</tuple>
<tuple>
<string>incoming</string>
<string>Incoming</string>
<string>past</string>
<string>Past Events</string>
</tuple>
</list>
</value>
......@@ -376,6 +376,10 @@
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -386,6 +390,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -429,6 +439,10 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
......@@ -457,6 +471,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -521,6 +539,12 @@
<key> <string>stat_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Meetings</string> </value>
......@@ -545,10 +569,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -62,10 +62,8 @@ request_stop_date = request.get(\'at_date\', None)\n
request_ticket_type = request.get(\'sale_opportunity_type\', None)\n
request_validation_state = request.get(\'sale_opportunity_state\', None)\n
\n
outgoing_state_list = portal.Event_getOutgoingStateList()\n
incoming_state_list = portal.Event_getIncomingStateList()\n
outgoing_title=portal.Base_translateString("Outgoing")\n
incoming_title=portal.Base_translateString("Incoming")\n
future_state_list = portal.Event_getFutureStateList()\n
past_state_list = portal.Event_getPastStateList()\n
\n
line_list = []\n
\n
......@@ -91,10 +89,10 @@ ticketlist=portal.portal_catalog.searchResults(portal_type="Sale Opportunity",\n
# Get every result object\n
for r_ticket in ticketlist: \n
ticket=r_ticket.getObject()\n
#show outgoing follow-up events\n
#show future follow-up events\n
eventlist=portal.portal_catalog.searchResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=outgoing_state_list)\n
simulation_state=future_state_list)\n
#sort the list by destination (recipient)\n
eventlist_sorted=[]\n
for event in eventlist:\n
......@@ -103,7 +101,6 @@ for r_ticket in ticketlist: \n
for event in eventlist_sorted:\n
line_list.append( Object(uid=\'new_\',\n
sale_opportunity = ticket.getTitle(),\n
direction = outgoing_title,\n
type = event.getTranslatedPortalType(),\n
destination_title_list = event.getDestinationTitleList(),\n
title = event.getTitle(),\n
......@@ -111,22 +108,17 @@ for r_ticket in ticketlist: \n
start_date = event.getStartDate(),\n
source = event.getSourceTitle(),\n
validation_state = event.getTranslatedSimulationStateTitle()))\n
#show incoming or outgoing causality events of every outgoing event\n
#show past or future causality events of every future event\n
event_causality_list=portal.portal_catalog.searchResults(portal_type=\n
portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list+incoming_state_list,\n
simulation_state=future_state_list+past_state_list,\n
causality_uid=event.getUid())\n
for r_event_causality in event_causality_list:\n
event_causality=r_event_causality.getObject()\n
#check that one event it isn\'t related by causality and follow-up with the same ticket\n
if ticket.getUid()<>event_causality.getFollowUpUid():\n
if event_causality.getSimulationState() in incoming_state_list:\n
direction_state = incoming_title\n
else:\n
direction_state = outgoing_title\n
line_list.append( Object(uid=\'new_\',\n
sale_opportunity = "",\n
direction = direction_state,\n
type = event_causality.getTranslatedPortalType(),\n
destination_title_list = event_causality.getDestinationTitleList(),\n
title = event_causality.getTitle(),\n
......@@ -135,10 +127,10 @@ for r_ticket in ticketlist: \n
source = event_causality.getSourceTitle(),\n
validation_state = event_causality.getTranslatedSimulationStateTitle()))\n
\n
#show incoming follow-up events\n
#show past follow-up events\n
eventlist=portal.portal_catalog.searchResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=incoming_state_list)\n
simulation_state=past_state_list)\n
#sort the list by source\n
eventlist_sorted=[]\n
for event in eventlist:\n
......@@ -147,7 +139,6 @@ for r_ticket in ticketlist: \n
for event in eventlist_sorted:\n
line_list.append( Object(uid=\'new_\',\n
sale_opportunity = ticket.getTitle(),\n
direction = incoming_title,\n
type = event.getTranslatedPortalType(),\n
destination_title_list = event.getDestinationTitleList(),\n
title = event.getTitle(),\n
......@@ -155,22 +146,17 @@ for r_ticket in ticketlist: \n
start_date = event.getStartDate(),\n
source = event.getSourceTitle(),\n
validation_state = event.getTranslatedSimulationStateTitle()))\n
#show incoming or outgoing causality events of every incoming event\n
#show past or future causality events of every past event\n
event_causality_list=portal.portal_catalog.searchResults(portal_type=\n
portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list+incoming_state_list,\n
simulation_state=future_state_list+past_state_list,\n
causality_uid=event.getUid())\n
for r_event_causality in event_causality_list:\n
event_causality=r_event_causality.getObject()\n
#check that one event it isn\'t related by causality and follow-up with the same ticket\n
if ticket.getUid()<>event_causality.getFollowUpUid():\n
if event_causality.getSimulationState() in incoming_state_list:\n
direction_state = incoming_title\n
else:\n
direction_state = outgoing_title\n
line_list.append( Object(uid=\'new_\',\n
sale_opportunity = "",\n
direction = direction_state,\n
type = event_causality.getTranslatedPortalType(),\n
destination_title_list = event_causality.getDestinationTitleList(),\n
title = event_causality.getTitle(),\n
......
......@@ -60,8 +60,8 @@ request_stop_date = request.get(\'at_date\', None)\n
request_ticket_type = request.get(\'sale_opportunity_type\', None)\n
request_validation_state = request.get(\'sale_opportunity_state\', None)\n
\n
outgoing_state_list = portal.Event_getOutgoingStateList()\n
incoming_state_list = portal.Event_getIncomingStateList()\n
future_state_list = portal.Event_getFutureStateList()\n
past_state_list = portal.Event_getPastStateList()\n
\n
line_list = []\n
\n
......@@ -88,24 +88,24 @@ ticketlist=portal.portal_catalog.searchResults(portal_type="Sale Opportunity",\n
# Get every result object\n
for r_ticket in ticketlist:\n
ticket=r_ticket.getObject()\n
outgoing = 0\n
incoming = 0\n
#count outgoing follow-up events\n
outgoing=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
future = 0\n
past = 0\n
#count future follow-up events\n
future=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=outgoing_state_list)[0][0])\n
#count incoming follow-up events\n
incoming=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
simulation_state=future_state_list)[0][0])\n
#count past follow-up events\n
past=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=incoming_state_list)[0][0])\n
#count incoming causality events\n
incoming+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
simulation_state=past_state_list)[0][0])\n
#count past causality events\n
past+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
portal_type=portal.getPortalEventTypeList(),\n
simulation_state=incoming_state_list)[0][0])\n
#count outgoing causality events\n
outgoing+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
simulation_state=past_state_list)[0][0])\n
#count future causality events\n
future+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
portal_type=portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list)[0][0]) \n
simulation_state=future_state_list)[0][0]) \n
line_list.append(Object(uid=\'new_\',\n
title = ticket.getTitle(),\n
ticket_type = ticket.getResourceTranslatedTitle(),\n
......@@ -116,8 +116,8 @@ for r_ticket in ticketlist:\n
source_decision = ticket.getSourceDecisionTitle(),\n
source = ticket.getSourceTitle(),\n
validation_state = ticket.getTranslatedSimulationStateTitle(),\n
outgoing = outgoing,\n
incoming = incoming))\n
future = future,\n
past = past))\n
\n
if line_list == []:\n
line_list.append(Object(uid=\'new_\'))\n
......
......@@ -313,6 +313,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>anchor</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
......@@ -321,10 +325,6 @@
<string>sale_opportunity</string>
<string>Sale Opportunity</string>
</tuple>
<tuple>
<string>direction</string>
<string>Direction</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
......@@ -364,6 +364,10 @@
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -374,6 +378,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -417,10 +427,18 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>20</int> </value>
......@@ -441,6 +459,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -461,6 +483,10 @@
<key> <string>report_tree</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
......@@ -501,10 +527,22 @@
<key> <string>stat_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Events</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......@@ -519,13 +557,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
</tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -358,12 +358,12 @@
<string>State</string>
</tuple>
<tuple>
<string>outgoing</string>
<string>Outgoing</string>
<string>future</string>
<string>Future Events</string>
</tuple>
<tuple>
<string>incoming</string>
<string>Incoming</string>
<string>past</string>
<string>Past Events</string>
</tuple>
</list>
</value>
......@@ -376,6 +376,10 @@
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -386,6 +390,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -429,6 +439,10 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
......@@ -457,6 +471,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -521,6 +539,12 @@
<key> <string>stat_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Sale Opportunity</string> </value>
......@@ -545,10 +569,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -62,10 +62,8 @@ request_stop_date = request.get(\'at_date\', None)\n
request_ticket_type = request.get(\'support_request_type\', None)\n
request_validation_state = request.get(\'validation_state\', None)\n
\n
outgoing_state_list = portal.Event_getOutgoingStateList()\n
incoming_state_list = portal.Event_getIncomingStateList()\n
outgoing_title=portal.Base_translateString("Outgoing")\n
incoming_title=portal.Base_translateString("Incoming")\n
future_state_list = portal.Event_getFutureStateList()\n
past_state_list = portal.Event_getPastStateList()\n
\n
line_list = []\n
\n
......@@ -91,10 +89,10 @@ ticketlist=portal.portal_catalog.searchResults(portal_type="Support Request",\n
# Get every result object\n
for r_ticket in ticketlist: \n
ticket=r_ticket.getObject()\n
#show incoming follow-up events\n
#show past follow-up events\n
eventlist=portal.portal_catalog.searchResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=incoming_state_list)\n
simulation_state=past_state_list)\n
#sort the list by source\n
eventlist_sorted=[]\n
for event in eventlist:\n
......@@ -103,7 +101,6 @@ for r_ticket in ticketlist: \n
for event in eventlist_sorted:\n
line_list.append( Object(uid=\'new_\',\n
support_request = ticket.getTitle(),\n
direction = incoming_title,\n
type = event.getTranslatedPortalType(),\n
destination_title_list = event.getDestinationTitleList(),\n
title = event.getTitle(),\n
......@@ -111,22 +108,17 @@ for r_ticket in ticketlist: \n
start_date = event.getStartDate(),\n
source = event.getSourceTitle(),\n
validation_state = event.getTranslatedSimulationStateTitle()))\n
#show incoming or outgoing causality events of every incoming event\n
#show past or future causality events of every past event\n
event_causality_list=portal.portal_catalog.searchResults(portal_type=\n
portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list+incoming_state_list,\n
simulation_state=future_state_list+past_state_list,\n
causality_uid=event.getUid())\n
for r_event_causality in event_causality_list:\n
event_causality=r_event_causality.getObject()\n
#check that one event it isn\'t related by causality and follow-up with the same ticket\n
if ticket.getUid()<>event_causality.getFollowUpUid():\n
if event_causality.getSimulationState() in incoming_state_list:\n
direction_state = incoming_title\n
else:\n
direction_state = outgoing_title\n
line_list.append( Object(uid=\'new_\',\n
support_request = "",\n
direction = direction_state,\n
type = event_causality.getTranslatedPortalType(),\n
destination_title_list = event_causality.getDestinationTitleList(),\n
title = event_causality.getTitle(),\n
......@@ -134,10 +126,10 @@ for r_ticket in ticketlist: \n
start_date = event_causality.getStartDate(),\n
source = event_causality.getSourceTitle(),\n
validation_state = event_causality.getTranslatedSimulationStateTitle()))\n
#show outgoing follow-up events\n
#show future follow-up events\n
eventlist=portal.portal_catalog.searchResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=outgoing_state_list)\n
simulation_state=future_state_list)\n
#sort the list by destination (recipient)\n
eventlist_sorted=[]\n
for event in eventlist:\n
......@@ -146,7 +138,6 @@ for r_ticket in ticketlist: \n
for event in eventlist_sorted:\n
line_list.append( Object(uid=\'new_\',\n
support_request = ticket.getTitle(),\n
direction = outgoing_title,\n
type = event.getTranslatedPortalType(),\n
destination_title_list = event.getDestinationTitleList(),\n
title = event.getTitle(),\n
......@@ -154,22 +145,17 @@ for r_ticket in ticketlist: \n
start_date = event.getStartDate(),\n
source = event.getSourceTitle(),\n
validation_state = event.getTranslatedSimulationStateTitle()))\n
#show incoming or outgoing causality events of every outgoing event\n
#show past or future causality events of every future event\n
event_causality_list=portal.portal_catalog.searchResults(portal_type=\n
portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list+incoming_state_list,\n
simulation_state=future_state_list+past_state_list,\n
causality_uid=event.getUid())\n
for r_event_causality in event_causality_list:\n
event_causality=r_event_causality.getObject()\n
#check that one event it isn\'t related by causality and follow-up with the same ticket\n
if ticket.getUid()<>event_causality.getFollowUpUid():\n
if event_causality.getSimulationState() in incoming_state_list:\n
direction_state = incoming_title\n
else:\n
direction_state = outgoing_title\n
line_list.append( Object(uid=\'new_\',\n
support_request = "",\n
direction = direction_state,\n
type = event_causality.getTranslatedPortalType(),\n
destination_title_list = event_causality.getDestinationTitleList(),\n
title = event_causality.getTitle(),\n
......
......@@ -60,8 +60,8 @@ request_stop_date = request.get(\'at_date\', None)\n
request_ticket_type = request.get(\'support_request_type\', None)\n
request_validation_state = request.get(\'validation_state\', None)\n
\n
outgoing_state_list = portal.Event_getOutgoingStateList()\n
incoming_state_list = portal.Event_getIncomingStateList()\n
future_state_list = portal.Event_getFutureStateList()\n
past_state_list = portal.Event_getPastStateList()\n
\n
line_list = []\n
\n
......@@ -88,24 +88,24 @@ ticketlist=portal.portal_catalog.searchResults(portal_type="Support Request",\n
# Get every result object\n
for r_ticket in ticketlist:\n
ticket=r_ticket.getObject()\n
outgoing = 0\n
incoming = 0\n
#count outgoing follow-up events\n
outgoing=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
future = 0\n
past = 0\n
#count future follow-up events\n
future=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=outgoing_state_list)[0][0])\n
#count incoming follow-up events\n
incoming=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
simulation_state=future_state_list)[0][0])\n
#count past follow-up events\n
past=int(portal.portal_catalog.countResults(portal_type=portal.getPortalEventTypeList(),\n
follow_up_uid=ticket.getUid(),\n
simulation_state=incoming_state_list)[0][0])\n
#count incoming causality events\n
incoming+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
simulation_state=past_state_list)[0][0])\n
#count past causality events\n
past+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
portal_type=portal.getPortalEventTypeList(),\n
simulation_state=incoming_state_list)[0][0])\n
#count outgoing causality events\n
outgoing+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
simulation_state=past_state_list)[0][0])\n
#count future causality events\n
future+=int(portal.portal_catalog.countResults(event_causality_ticket_uid=ticket.getUid(),\n
portal_type=portal.getPortalEventTypeList(),\n
simulation_state=outgoing_state_list)[0][0]) \n
simulation_state=future_state_list)[0][0]) \n
line_list.append(Object(uid=\'new_\',\n
title = ticket.getTitle(),\n
ticket_type = ticket.getResourceTranslatedTitle(),\n
......@@ -116,8 +116,8 @@ for r_ticket in ticketlist:\n
source_decision = ticket.getSourceDecisionTitle(),\n
source = ticket.getSourceTitle(),\n
validation_state = ticket.getTranslatedSimulationStateTitle(),\n
outgoing = outgoing,\n
incoming = incoming))\n
future = future,\n
past = past))\n
\n
if line_list == []:\n
line_list.append(Object(uid=\'new_\'))\n
......
......@@ -313,6 +313,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>anchor</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
......@@ -321,10 +325,6 @@
<string>support_request</string>
<string>Support Request</string>
</tuple>
<tuple>
<string>direction</string>
<string>Direction</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
......@@ -364,6 +364,10 @@
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -374,6 +378,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -417,10 +427,18 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>20</int> </value>
......@@ -441,6 +459,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -461,6 +483,10 @@
<key> <string>report_tree</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
......@@ -501,10 +527,22 @@
<key> <string>stat_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Events</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......@@ -519,13 +557,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
</tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -358,12 +358,12 @@
<string>State</string>
</tuple>
<tuple>
<string>incoming</string>
<string>Incoming</string>
<string>future</string>
<string>Future Events</string>
</tuple>
<tuple>
<string>outgoing</string>
<string>Outgoing</string>
<string>past</string>
<string>Past Events</string>
</tuple>
</list>
</value>
......@@ -376,6 +376,10 @@
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -386,6 +390,12 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
......@@ -429,6 +439,10 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
......@@ -457,6 +471,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -521,6 +539,12 @@
<key> <string>stat_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Support Request</string> </value>
......@@ -545,10 +569,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
......
2011-12-13 Kazuhiko
* use event_simulation_workflow instead of event_workflow for Event-type portal types. use portal_alarms/upgrader_migrate_event_workflow_history for migration.
2010-11-05 yusei
* Simplify Event_init.
......
577
\ No newline at end of file
578
\ No newline at end of file
......@@ -6,17 +6,17 @@ Campaign | ticket_workflow
Fax Message | document_conversion_interaction_workflow
Fax Message | edit_workflow
Fax Message | event_interaction_workflow
Fax Message | event_workflow
Fax Message | event_simulation_workflow
Fax Message | pricing_interaction_workflow
Letter | document_conversion_interaction_workflow
Letter | edit_workflow
Letter | event_interaction_workflow
Letter | event_workflow
Letter | event_simulation_workflow
Letter | pricing_interaction_workflow
Mail Message | document_conversion_interaction_workflow
Mail Message | edit_workflow
Mail Message | event_interaction_workflow
Mail Message | event_workflow
Mail Message | event_simulation_workflow
Mail Message | pricing_interaction_workflow
Meeting | edit_workflow
Meeting | pricing_interaction_workflow
......@@ -25,12 +25,12 @@ Meeting | ticket_workflow
Note | document_conversion_interaction_workflow
Note | edit_workflow
Note | event_interaction_workflow
Note | event_workflow
Note | event_simulation_workflow
Note | pricing_interaction_workflow
Phone Call | document_conversion_interaction_workflow
Phone Call | edit_workflow
Phone Call | event_interaction_workflow
Phone Call | event_workflow
Phone Call | event_simulation_workflow
Phone Call | pricing_interaction_workflow
Sale Opportunity | edit_workflow
Sale Opportunity | pricing_interaction_workflow
......@@ -39,12 +39,12 @@ Sale Opportunity | ticket_interaction_workflow
Short Message | document_conversion_interaction_workflow
Short Message | edit_workflow
Short Message | event_interaction_workflow
Short Message | event_workflow
Short Message | event_simulation_workflow
Short Message | pricing_interaction_workflow
Site Message | document_conversion_interaction_workflow
Site Message | edit_workflow
Site Message | event_interaction_workflow
Site Message | event_workflow
Site Message | event_simulation_workflow
Support Request | edit_workflow
Support Request | pricing_interaction_workflow
Support Request | ticket_interaction_workflow
......@@ -52,10 +52,10 @@ Support Request | ticket_workflow
Visit | document_conversion_interaction_workflow
Visit | edit_workflow
Visit | event_interaction_workflow
Visit | event_workflow
Visit | event_simulation_workflow
Visit | pricing_interaction_workflow
Web Message | document_conversion_interaction_workflow
Web Message | edit_workflow
Web Message | event_interaction_workflow
Web Message | event_workflow
Web Message | event_simulation_workflow
Web Message | pricing_interaction_workflow
\ No newline at end of file
......@@ -95,18 +95,18 @@ class TestCRM(BaseTestCRM):
event = event_module.newContent(portal_type=ptype,
follow_up_value=ticket)
event.receive()
event.respond()
event.stop()
self.assertEqual(len(event.getCausalityRelatedValueList()), 0)
transaction.commit()
self.tic()
portal_workflow.doActionFor(event, 'create_related_event_action',
related_event_portal_type=ptype,
related_event_title='New Title',
related_event_description='New Desc')
event.Event_createResponse(response_event_portal_type=ptype,
response_event_title='New Title',
response_event_text_content='New Desc',
response_workflow_action='plan',
)
transaction.commit()
self.tic()
......@@ -117,7 +117,7 @@ class TestCRM(BaseTestCRM):
self.assertEqual(related_event.getPortalType(), ptype)
self.assertEqual(related_event.getTitle(), 'New Title')
self.assertEqual(related_event.getDescription(), 'New Desc')
self.assertEqual(related_event.getTextContent(), 'New Desc')
self.assertEqual(related_event.getFollowUpValue(), ticket)
def test_Event_CreateRelatedEventUnauthorized(self):
......@@ -146,7 +146,7 @@ class TestCRM(BaseTestCRM):
transaction.commit()
self.tic()
new_event = ticket.getFollowUpRelatedValueList()[0]
self.assertEquals('new', new_event.getSimulationState())
self.assertEquals('stopped', new_event.getSimulationState())
# outgoing
ticket.Ticket_newEvent(direction='outgoing',
......@@ -284,6 +284,7 @@ class TestCRM(BaseTestCRM):
self.portal.portal_workflow.doActionFor(so, 'expire_action')
self.assertEquals('expired', so.getSimulationState())
@expectedFailure
def test_Event_AcknowledgeAndCreateEvent(self):
"""
Make sure that when acknowledge event, we can create a new event.
......@@ -968,16 +969,16 @@ class TestCRMMailSend(BaseTestCRM):
self.assertEquals((), self.portal.MailHost._last_message)
def test_MailMarkPosted(self):
# mark_started_action transition on event workflow will not send an email
# even if the portal type is a Mail Message
# start_action transition without send_mail variable on event
# simulation workflow will not send an email even if the portal
# type is a Mail Message
for ptype in [x for x in self.portal.getPortalEventTypeList() if x !=
'Acknowledgement']:
event = self.portal.event_module.newContent(portal_type=ptype)
event.setSource('person_module/me')
event.setDestination('person_module/recipient')
event.setTextContent('Hello !')
self.portal.portal_workflow.doActionFor(event, 'receive_action')
self.portal.portal_workflow.doActionFor(event, 'mark_started_action')
self.portal.portal_workflow.doActionFor(event, 'start_action')
transaction.commit()
self.tic()
......@@ -1324,13 +1325,13 @@ class TestCRMMailSend(BaseTestCRM):
destination='person_module/recipient',
text_content='This is an advertisement mail.')
first_event_id = event.getId()
self.getWorkflowTool().doActionFor(event, 'respond_action',
respond_event_portal_type = "Mail Message",
respond_event_title = "Answer",
respond_event_text_content="> This is an advertisement mail."
)
event.Event_createResponse(response_event_portal_type='Mail Message',
response_event_title='Answer',
response_event_text_content='> This is an advertisement mail.',
response_workflow_action='send',
)
self.assertEqual(event.getSimulationState(), "responded")
self.assertEqual(event.getSimulationState(), "stopped")
# answer event must have been created
self.assertEqual(len(self.portal.event_module), 2)
......
This diff is collapsed.
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