Commit 22aeb137 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm: Create a single ticket for causality (monitoring) regardless the title

   Overtime, the compute node can fail differently before the administrator take action, create multiple tickets for the
   same compute node don't help.

   Whenever you have a ticket for a computer or instance, it is irrelevant to create a second since the unsolved first one
   is most likely the source of the second one.

   Fewer tickets increase efficiency, and encourage no ticket pending policy and to resolve the problems.
parent 966008dc
portal = context.getPortalObject()
project = context
monitor_service_uid = portal.service_module.slapos_crm_monitoring.getUid(),
causality_value = portal.restrictedTraverse(causality)
if portal.portal_catalog.getResultValue(
portal_type='Support Request',
title={'query': title, 'key': 'ExactMatch'},
resource__uid=monitor_service_uid,
simulation_state=["validated", "submitted", "suspended"],
causality__uid=causality_value.getUid(),
) is not None:
......
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