Commit d312d7cb authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm: Pass the number of the days from a parameter to the message

parent 30e787cf
......@@ -3,6 +3,7 @@ if REQUEST is not None:
raise Unauthorized
portal = context.getPortalObject()
ndays = 15
language = "en"
recipient = context.getDestinationSectionValue()
if recipient is not None:
......@@ -24,7 +25,8 @@ The slapos team
else:
notification_mapping_dict = {
'user_name': context.getDestinationSectionTitle()}
'user_name': context.getDestinationSectionTitle(),
'days': ndays}
subject = notification_message.getTitle()
......@@ -37,7 +39,7 @@ else:
substitution_method_parameter_dict={'mapping_dict':notification_mapping_dict})
return context.RegularisationRequest_checkToTriggerNextEscalationStep(
delay_period_in_days=15,
delay_period_in_days=ndays,
current_service_relative_url='service_module/slapos_crm_acknowledgement',
next_service_relative_url='service_module/slapos_crm_stop_reminder',
title=subject,
......
......@@ -3,6 +3,7 @@ if REQUEST is not None:
raise Unauthorized
portal = context.getPortalObject()
ndays = 10
language = "en"
recipient = context.getDestinationSectionValue()
if recipient is not None:
......@@ -23,7 +24,8 @@ The slapos team
""" % context.getPortalObject().portal_preferences.getPreferredSlaposWebSiteUrl()
else:
notification_mapping_dict = {
'user_name': context.getDestinationSectionTitle()}
'user_name': context.getDestinationSectionTitle(),
'days': ndays}
subject = notification_message.getTitle()
......@@ -36,7 +38,7 @@ else:
substitution_method_parameter_dict={'mapping_dict':notification_mapping_dict})
return context.RegularisationRequest_checkToTriggerNextEscalationStep(
delay_period_in_days=10,
delay_period_in_days=ndays,
current_service_relative_url='service_module/slapos_crm_delete_reminder',
next_service_relative_url='service_module/slapos_crm_delete_acknowledgement',
title=subject,
......
......@@ -3,6 +3,7 @@ if REQUEST is not None:
raise Unauthorized
portal = context.getPortalObject()
ndays = 7
language = "en"
recipient = context.getDestinationSectionValue()
if recipient is not None:
......@@ -23,7 +24,8 @@ The slapos team
""" % context.getPortalObject().portal_preferences.getPreferredSlaposWebSiteUrl()
else:
notification_mapping_dict = {
'user_name': context.getDestinationSectionTitle()}
'user_name': context.getDestinationSectionTitle(),
'days': ndays}
subject = notification_message.getTitle()
......@@ -36,7 +38,7 @@ else:
substitution_method_parameter_dict={'mapping_dict':notification_mapping_dict})
return context.RegularisationRequest_checkToTriggerNextEscalationStep(
delay_period_in_days=7,
delay_period_in_days=ndays,
current_service_relative_url='service_module/slapos_crm_stop_acknowledgement',
next_service_relative_url='service_module/slapos_crm_delete_reminder',
title=subject,
......
......@@ -3,6 +3,7 @@ if REQUEST is not None:
raise Unauthorized
portal = context.getPortalObject()
ndays = 7
language = "en"
recipient = context.getDestinationSectionValue()
if recipient is not None:
......@@ -23,7 +24,8 @@ The slapos team
""" % context.getPortalObject().portal_preferences.getPreferredSlaposWebSiteUrl()
else:
notification_mapping_dict = {
'user_name': context.getDestinationSectionTitle()}
'user_name': context.getDestinationSectionTitle(),
'days': ndays}
subject = notification_message.getTitle()
......@@ -36,7 +38,7 @@ else:
substitution_method_parameter_dict={'mapping_dict':notification_mapping_dict})
return context.RegularisationRequest_checkToTriggerNextEscalationStep(
delay_period_in_days=7,
delay_period_in_days=ndays,
current_service_relative_url='service_module/slapos_crm_stop_reminder',
next_service_relative_url='service_module/slapos_crm_stop_acknowledgement',
title=subject,
......
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