From 18e21a87d059a715920e2eeb7374983fbd116cbd Mon Sep 17 00:00:00 2001 From: Proudlock <270015376@geaerospace.com> Date: Wed, 9 Sep 2026 09:59:43 -0400 Subject: [PATCH] Simplify operator report email body - Device: shows only hostname (not name) - Removed Asset Number line - Machine#: shows only machine number as clickable link (if relationship exists) - Keep Reason, Reported, Details, and Screenshot --- plugins/endpoints/api/routes.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/endpoints/api/routes.py b/plugins/endpoints/api/routes.py index d816713b..1e200664 100644 --- a/plugins/endpoints/api/routes.py +++ b/plugins/endpoints/api/routes.py @@ -3012,7 +3012,6 @@ def _send_operator_report_alert(report, asset_id, hostname): machine_body_line = '' if machine_info: safe_machine_number = escape(machine_info['assetnumber'] or 'N/A') - safe_machine_name = escape(machine_info['name'] or safe_machine_number) try: scheme = request.scheme if request else 'https' host = request.host if request else 'localhost' @@ -3021,7 +3020,7 @@ def _send_operator_report_alert(report, asset_id, hostname): machine_url = f'https://localhost/shopdb/machines/{machine_info["assetid"]}' machine_subject_part = f' (Machine #{safe_machine_number})' - machine_body_line = f'
Machine: {safe_machine_name} (#{safe_machine_number})
' + machine_body_line = f'Machine#: {safe_machine_number}
' # Build HTML body (don't use render_email to avoid subject duplication) html_body = f''' @@ -3029,8 +3028,7 @@ def _send_operator_report_alert(report, asset_id, hostname):New Issue Report from Shop Floor
-Device: {safe_name} ({safe_hostname})
-Asset Number: {safe_assetnumber}
+Device: {safe_hostname}
{machine_body_line}Reason: {safe_reason}
Reported: {escape(reported_at)}