diff --git a/checkbox-ng/plainbox/impl/exporter/jinja2.py b/checkbox-ng/plainbox/impl/exporter/jinja2.py index 7b76a2260..78081e353 100644 --- a/checkbox-ng/plainbox/impl/exporter/jinja2.py +++ b/checkbox-ng/plainbox/impl/exporter/jinja2.py @@ -45,6 +45,7 @@ from plainbox import get_version_string +from plainbox import __version__ as checkbox_version from plainbox.abc import ISessionStateExporter from plainbox.impl.exporter import SessionStateExporterBase from plainbox.impl.result import OUTCOME_METADATA_MAP @@ -109,6 +110,7 @@ def __init__( self._client_version = client_version or get_version_string() # Remember client name self._client_name = client_name + self._checkbox_version = checkbox_version self.option_list = None self.template = None @@ -195,6 +197,7 @@ def dump_from_session_manager(self, session_manager, stream): "OUTCOME_METADATA_MAP": OUTCOME_METADATA_MAP, "client_name": self._client_name, "client_version": self._client_version, + "checkbox_version": self._checkbox_version, "manager": session_manager, "app_blob": app_blob_data, "options": self.option_list, @@ -220,6 +223,7 @@ def dump_from_session_manager_list(self, session_manager_list, stream): "OUTCOME_METADATA_MAP": OUTCOME_METADATA_MAP, "client_name": self._client_name, "client_version": self._client_version, + "checkbox_version": self._checkbox_version, "manager_list": session_manager_list, "app_blob": {}, "options": self.option_list, diff --git a/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json b/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json index f55659542..fca270195 100644 --- a/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json +++ b/checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json @@ -6,6 +6,8 @@ {%- set system_information = state.system_information -%} { "title": {{ state.metadata.title | jsonify | safe }}, + "client_version": {{ client_version | jsonify | safe }}, + "checkbox_version": {{ checkbox_version | jsonify | safe }}, {%- if "testplan_id" in app_blob %} {%- if app_blob['testplan_id'] %} "testplan_id": {{ app_blob['testplan_id'] | jsonify | safe }}, diff --git a/submission-schema/schema.json b/submission-schema/schema.json index 6037fd187..baaa98aa0 100644 --- a/submission-schema/schema.json +++ b/submission-schema/schema.json @@ -11,6 +11,12 @@ "title": { "type": "string" }, + "client_version": { + "type": "string" + }, + "checkbox_version": { + "type": "string" + }, "testplan_id": { "type": "string" },