From b965681b7598f8727efd5c9a7a7dcdba388e3a9c Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Wed, 13 Nov 2024 17:52:40 +0100 Subject: [PATCH] Add `plugin` and `template_id` to resource and attachment results in submission.json (bugfix) (#1596) Add plugin and template_id in resource and attachment results These values should be there, since all of these are jobs. --- .../plainbox/impl/providers/exporters/data/checkbox.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json b/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json index fca270195..53a1673e1 100644 --- a/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json +++ b/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json @@ -67,7 +67,7 @@ "type": "test", "project": "certification", "duration": {{ job_state.result.execution_duration if job_state.result.execution_duration else 0 }}, - "plugin": "{{ job_state.job.plugin }}", + "plugin": {{ job_state.job.plugin | jsonify | safe }}, "template_id": {{ job_state.job.template_id | jsonify | safe }} }{%- if not loop.last -%},{%- endif %} {%- endfor %} @@ -87,7 +87,9 @@ "io_log": {{ job_state.result.io_log_as_flat_text | jsonify | safe }}, "type": "test", "project": "certification", - "duration": {{ job_state.result.execution_duration if job_state.result.execution_duration else 0}} + "duration": {{ job_state.result.execution_duration if job_state.result.execution_duration else 0 }}, + "plugin": {{ job_state.job.plugin | jsonify | safe }}, + "template_id": {{ job_state.job.template_id | jsonify | safe }} }{%- if not loop.last -%},{%- endif %} {%- endfor %} ], @@ -104,7 +106,8 @@ "outcome": "{{ job_state.result.outcome }}", "comments": {{ job_state.result.comments | jsonify | safe }}, "io_log": {{ job_state.result.io_log_as_text_attachment | jsonify | safe }}, - "duration": {{ job_state.result.execution_duration if job_state.result.execution_duration else 0}}, + "duration": {{ job_state.result.execution_duration if job_state.result.execution_duration else 0 }}, + "plugin": {{ job_state.job.plugin | jsonify | safe }}, "template_id": {{ job_state.job.template_id | jsonify | safe }} }{%- if not loop.last -%},{%- endif %} {%- endfor %}