Commit dcf4c9a3 authored by Romain Courteaud's avatar Romain Courteaud

Revert "slapos_crm: Consider the default as "disabled" for monitor_scope"

This reverts commit d127603b.
parent 3defd07f
......@@ -3,7 +3,7 @@ portal = context.getPortalObject()
person = context.getSourceAdministrationValue(portal_type="Person")
if not person or \
context.getMonitorScope("disabled") == "disabled" or \
context.getMonitorScope() == "disabled" or \
portal.ERP5Site_isSupportRequestCreationClosed():
return
......
......@@ -3,7 +3,7 @@ portal = context.getPortalObject()
person = context.getSourceAdministrationValue(portal_type="Person")
if not person or \
context.getMonitorScope("disabled") == "disabled" or \
context.getMonitorScope() == "disabled" or \
portal.ERP5Site_isSupportRequestCreationClosed():
return
......
......@@ -4,7 +4,7 @@ from erp5.component.module.DateUtils import addToDate
instance_tree = context
portal = context.getPortalObject()
if instance_tree.getMonitorScope("disabled") == "disabled":
if instance_tree.getMonitorScope() == "disabled":
# Don't generate ticket if Monitor Scope is marked to disable
return
......
......@@ -13,7 +13,7 @@ if document is None:
aggregate_portal_type = document.getPortalType()
if aggregate_portal_type in ["Compute Node", "Instance Tree"] and \
document.getMonitorScope("disabled") == "disabled":
document.getMonitorScope() == "disabled":
return []
if aggregate_portal_type == "Instance Tree":
......
......@@ -14,7 +14,7 @@ if document is None:
aggregate_portal_type = document.getPortalType()
if aggregate_portal_type == "Compute Node":
if document.getMonitorScope("disabled") == "disabled":
if document.getMonitorScope() == "disabled":
return "Monitor is disabled to the related %s." % document.getPortalType()
d = document.getAccessStatus()
......@@ -65,7 +65,7 @@ if aggregate_portal_type == "Compute Node":
if aggregate_portal_type == "Software Installation":
compute_node_title = document.getAggregateTitle()
if document.getAggregateValue().getMonitorScope("disabled") == "disabled":
if document.getAggregateValue().getMonitorScope() == "disabled":
return "Monitor is disabled to the related %s." % document.getPortalType()
if document.getSlapState() not in ["start_requested", "stop_requested"]:
......@@ -87,7 +87,7 @@ if aggregate_portal_type == "Software Installation":
(document.getUrlString(), compute_node_title, document.getCreationDate())
if aggregate_portal_type == "Instance Tree":
if document.getMonitorScope("disabled") == "disabled":
if document.getMonitorScope() == "disabled":
return "Monitor is disabled to the related %s." % document.getPortalType()
message_list = []
......
......@@ -689,10 +689,9 @@ class TestSlapOSHasError(SlapOSTestCaseMixin):
instance_tree.validate()
new_id = self.generateNewId()
instance_tree.edit(
title="Test hosting sub ticket %s" % new_id,
title= "Test hosting sub ticket %s" % new_id,
reference="TESTHST-%s" % new_id,
destination_section_value=person,
monitor_scope="enabled"
destination_section_value=person
)
return instance_tree
......@@ -1037,7 +1036,7 @@ class TestSupportRequestUpdateMonitoringState(SlapOSTestCaseMixin):
instance_tree.validate()
new_id = self.generateNewId()
instance_tree.edit(
title="Test hosting sub ticket %s" % new_id,
title= "Test hosting sub ticket %s" % new_id,
reference="TESTHST-%s" % new_id,
destination_section_value=person
)
......
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