Skip to content
Snippets Groups Projects
Commit 5f3e103b authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Remove attachments from email reports. (Redmine issue: #6255)

parent f7141de1
No related branches found
No related tags found
No related merge requests found
......@@ -113,13 +113,6 @@
{{ _('This report contains fraction of data from parent summary report [{:s}], that is also available in HTML format at:').format(report.parent.label) | wordwrap(width=text_width, break_long_words=False) }}
{{ additional_vars['report_access_url'] }}{{ report.parent.label }}/unauth
{% if settings.attachments == 'none' %}
{{ _('Appending attachments to email report is disabled in the reporting settings for your contact address. Please download complete information available for each event from URL above.') | wordwrap(width=text_width, break_long_words=False) }}
{%- elif not attachment_files %}
{{ _('Attachment files containing complete information available for each event exceeded maximal allowed size, please download them from URL above.') | wordwrap(width=text_width, break_long_words=False) }}
{%- else %}
{{ _('Complete information available for each event can also be found in the attached machine-processable files (we recommend JSON, which bears full data).') | wordwrap(width=text_width, break_long_words=False) }}
{%- endif %}
{{ _('This message was generated by an automated system. For further communication please use the contact email address <{:s}> and for easier orientation please keep the identifier [{:s}] in email subject.').format(additional_vars['contact_email'], report.label) | wordwrap(width=text_width, break_long_words=False) }}
......
......@@ -108,13 +108,6 @@
{{ macros_common.render_info_severity(report, text_width) }}
{{ _('Links to interactive web version of this report and complete data are located in the footer.') | wordwrap(width=text_width, break_long_words=False) }}
{% if settings.attachments == 'none' %}
{{ _('Appending attachments to email report is disabled in the reporting settings for your contact address. Please download complete information available for each event from URL above.') | wordwrap(width=text_width, break_long_words=False) }}
{%- elif not attachment_files %}
{{ _('Attachment files containing complete information available for each event exceeded maximal allowed size, please download them from URL above.') | wordwrap(width=text_width, break_long_words=False) }}
{%- else %}
{{ _('Complete information available for each event can also be found in the attached machine-processable files (we recommend JSON, which bears full data).') | wordwrap(width=text_width, break_long_words=False) }}
{%- endif %}
{{ _('This message was generated by an automated system. For further communication please use the contact email address <{:s}> and for easier orientation please keep the identifier [{:s}] in email subject.').format(additional_vars['contact_email'], report.label) | wordwrap(width=text_width, break_long_words=False) }}
......
......@@ -360,11 +360,12 @@ class EventReporter(BaseReporter):
'security-report-{}.csv'.format(report.label)
)
# Compose list of requested attachment files.
attachment_files = self.choose_attachments(
'security-report-{}'.format(report.label),
settings
)
# Attachments were moved from emails to web (Redmine issue #6255).
attachment_files = []
#attachment_files = self.choose_attachments(
# 'security-report-{}'.format(report.label),
# settings
#)
report.structured_data = self.prepare_structured_data(events.get('regular_aggr', {}), events.get('relapsed_aggr', {}), settings)
......@@ -441,11 +442,12 @@ class EventReporter(BaseReporter):
'security-report-{}.csv'.format(report.label)
)
# Compose list of requested attachment files.
attachment_files = self.choose_attachments(
'security-report-{}'.format(report.label),
settings
)
# Attachments were moved from emails to web (Redmine issue #6255).
attachment_files = []
#attachment_files = self.choose_attachments(
# 'security-report-{}'.format(report.label),
# settings
#)
report.structured_data = self.prepare_structured_data({src: events_regular_aggr}, {src: events_relapsed_aggr}, settings)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment