Commit a0644017 authored by Romain Courteaud's avatar Romain Courteaud

slapos_rss_style:

* drop template_software_installation
* drop template_instance_tree
* drop template_member
* test: fixup
* test: drop updateLocalRolesOnSecurityGroups calls
* test: drop usage of organisation_module.slapos
* stop using dropped related keys
* test: use dedicated scripts to create Ticket/Event
* test: Event_getRSSTextContent does not exist
* drop immediateReindexObject
* fix context_related parameter usage
parent e80aa188
...@@ -27,21 +27,29 @@ def getTicketInfo(event): ...@@ -27,21 +27,29 @@ def getTicketInfo(event):
if follow_up_portal_type is None: if follow_up_portal_type is None:
follow_up_portal_type = ['Support Request', 'Regularisation Request', 'Upgrade Decision'] 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 = {} context_kw = {}
if context_related: 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 = [] data_list = []
for brain in portal.portal_simulation.getMovementHistoryList( for brain in portal.portal_simulation.getMovementHistoryList(
security_query=portal.portal_catalog.getSecurityQuery(), security_query=portal.portal_catalog.getSecurityQuery(),
# Limit only to listable portal types # Limit only to listable portal types
portal_type=['Web Message', 'Mail Nessage'], portal_type=['Web Message', 'Mail Message'],
follow_up_simulation_state = ['validated','submitted', 'suspended', 'invalidated',
# Unfortunally Upgrade decision uses diferent states.
'confirmed', 'started', 'stopped', 'delivered'],
only_accountable=False, only_accountable=False,
follow_up_portal_type=follow_up_portal_type,
omit_input=True,
simulation_state=('started', 'stopped', 'delivered'), simulation_state=('started', 'stopped', 'delivered'),
limit=list_lines, limit=list_lines,
sort_on=(('stock.date', 'desc'), sort_on=(('stock.date', 'desc'),
......
return context.Base_getEventList( return context.Base_getEventList(
list_lines=list_lines, list_lines=list_lines,
follow_up_portal_type=context.getVisibleAllowedContentTypeList(), 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