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