Commit 2a5fb9ab authored by Romain Courteaud's avatar Romain Courteaud

slapos_rss_style: follow the new ticket/event structure

parent 4ec00b55
......@@ -27,21 +27,29 @@ def getTicketInfo(event):
if follow_up_portal_type is None:
follow_up_portal_type = ['Support Request', 'Regularisation Request', 'Upgrade Decision']
ticket_simulation_state = [
'validated','submitted', 'suspended', 'invalidated',
# Unfortunally Upgrade decision uses diferent states.
'confirmed', 'started', 'stopped', 'delivered'
]
context_kw = {}
if context_related:
context_kw['follow_up_default_or_child_aggregate_uid'] = context.getUid()
context_kw['follow_up__uid'] = [x.getUid() for x in portal.portal_catalog(
causality__uid=context.getUid(),
portal_type=follow_up_portal_type,
simulation_state=ticket_simulation_state
)] or [-1]
else:
context_kw['follow_up__simulation_state'] = ticket_simulation_state
context_kw['follow_up__portal_type'] = follow_up_portal_type
data_list = []
for brain in portal.portal_simulation.getMovementHistoryList(
security_query=portal.portal_catalog.getSecurityQuery(),
# Limit only to listable portal types
portal_type=['Web Message', 'Mail Nessage'],
follow_up_simulation_state = ['validated','submitted', 'suspended', 'invalidated',
# Unfortunally Upgrade decision uses diferent states.
'confirmed', 'started', 'stopped', 'delivered'],
portal_type=['Web Message', 'Mail Message'],
only_accountable=False,
follow_up_portal_type=follow_up_portal_type,
omit_input=True,
simulation_state=('started', 'stopped', 'delivered'),
limit=list_lines,
sort_on=(('stock.date', 'desc'),
......
return context.Base_getEventList(
list_lines=list_lines,
follow_up_portal_type=context.getVisibleAllowedContentTypeList(),
context_related=False, **kw)
**kw)
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