diff --git a/cdci_data_analysis/flask_app/templates/matrix_message.html b/cdci_data_analysis/flask_app/templates/matrix_message.html
index 52a1b9216..934996204 100644
--- a/cdci_data_analysis/flask_app/templates/matrix_message.html
+++ b/cdci_data_analysis/flask_app/templates/matrix_message.html
@@ -1,7 +1,7 @@
Dear User,
you receive this message because at {{ request.time_request | timestamp2isot }} ( {{ request.time_request | humanize_age }} ago ) you submitted a request
-for a {{ request.product_type }} from the service provided by {{ oda_site.site_name }} available at the URL {{ oda_site.frontend_url }}.
+for a {{ request.product_type }} (job_id: {{ request.job_id[:8] }}) from the service provided by {{ oda_site.site_name }} available at the URL {{ oda_site.frontend_url }}.
{% if request.status == "submitted" %}
The request has been submitted, and once products will be ready, you will receive a new message.
diff --git a/cdci_data_analysis/pytest_fixtures.py b/cdci_data_analysis/pytest_fixtures.py
index 3f8119714..18a0d9f30 100644
--- a/cdci_data_analysis/pytest_fixtures.py
+++ b/cdci_data_analysis/pytest_fixtures.py
@@ -1148,6 +1148,22 @@ class DispatcherJobState:
],
}
+ generalized_matrix_patterns = {
+ 'time_request_str': [
+ r'(because at )([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.*?)( \()',
+ '(requested at )(.*? .*?)( job_id:)'
+ ],
+ 'token_exp_time_str': [
+ '(and will be valid until )(.*? .*?)(.
)'
+ ],
+ 'products_url': [
+ '(href=")(.*?)(">url)',
+ ],
+ 'job_id': [
+ '(job_id: )(.*?)(\) from)'
+ ],
+ }
+
ignore_patterns = [
r'\( .*?ago \)',
r'"token":.*?,',
diff --git a/tests/reference_matrix_messages/done.html b/tests/reference_matrix_messages/done.html
index 1377225fb..63bb68b04 100644
--- a/tests/reference_matrix_messages/done.html
+++ b/tests/reference_matrix_messages/done.html
@@ -1,7 +1,7 @@
Dear User,
you receive this message because at 2021-08-19 17:24:51 ( 0.0 seconds ago ) you submitted a request
-for a dummy from the service provided by University of Geneva available at the URL PRODUCTS_URL.
+for a dummy (job_id: ac3f746e) from the service provided by University of Geneva available at the URL PRODUCTS_URL.
The platform have finished processing your request.
diff --git a/tests/reference_matrix_messages/failed.html b/tests/reference_matrix_messages/failed.html
index f33c98411..bb8d9eacd 100644
--- a/tests/reference_matrix_messages/failed.html
+++ b/tests/reference_matrix_messages/failed.html
@@ -1,7 +1,7 @@
Dear User,
you receive this message because at 2021-08-19 17:24:51 ( 0.0 seconds ago ) you submitted a request
-for a dummy from the service provided by University of Geneva available at the URL PRODUCTS_URL.
+for a dummy (job_id: ac3f746e) from the service provided by University of Geneva available at the URL PRODUCTS_URL.
Your request has failed. Sorry for that! You will be further contacted by our team.
diff --git a/tests/reference_matrix_messages/submitted-dummy.html b/tests/reference_matrix_messages/submitted-dummy.html
index bd5730e93..9847b415f 100644
--- a/tests/reference_matrix_messages/submitted-dummy.html
+++ b/tests/reference_matrix_messages/submitted-dummy.html
@@ -1,7 +1,7 @@
Dear User,
you receive this message because at 2021-08-19 17:24:51 ( 0.0 seconds ago ) you submitted a request
-for a dummy from the service provided by University of Geneva available at the URL PRODUCTS_URL.
+for a dummy (job_id: ac3f746e) from the service provided by University of Geneva available at the URL PRODUCTS_URL.
The request has been submitted, and once products will be ready, you will receive a new message.
diff --git a/tests/test_matrix_messages.py b/tests/test_matrix_messages.py
index 7fcf81b61..3b97cc9f3 100644
--- a/tests/test_matrix_messages.py
+++ b/tests/test_matrix_messages.py
@@ -178,7 +178,7 @@ def get_incident_report_matrix_message(**matrix_message_args):
def adapt_html(html_content, patterns=None, **matrix_message_args,):
if patterns is None:
- patterns = DispatcherJobState.generalized_patterns
+ patterns = DispatcherJobState.generalized_matrix_patterns
for arg, patterns in patterns.items():
if arg in matrix_message_args and matrix_message_args[arg] is not None:
for pattern in patterns: