diff --git a/changelogs/fragments/440-json-add-path-field.yaml b/changelogs/fragments/440-json-add-path-field.yaml new file mode 100644 index 0000000..4c15dcc --- /dev/null +++ b/changelogs/fragments/440-json-add-path-field.yaml @@ -0,0 +1,2 @@ +minor_changes: + - json and jsonl - Add the ``path`` attribute into the play and task output diff --git a/plugins/callback/json.py b/plugins/callback/json.py index f0c56b4..512f25b 100644 --- a/plugins/callback/json.py +++ b/plugins/callback/json.py @@ -67,6 +67,7 @@ class CallbackModule(CallbackBase): 'play': { 'name': play.get_name(), 'id': to_text(play._uuid), + 'path': to_text(play.get_path()), 'duration': { 'start': current_time() } @@ -79,6 +80,7 @@ class CallbackModule(CallbackBase): 'task': { 'name': task.get_name(), 'id': to_text(task._uuid), + 'path': to_text(task.get_path()), 'duration': { 'start': current_time() } diff --git a/plugins/callback/jsonl.py b/plugins/callback/jsonl.py index 2403dba..dc77b03 100644 --- a/plugins/callback/jsonl.py +++ b/plugins/callback/jsonl.py @@ -69,6 +69,7 @@ class CallbackModule(CallbackBase): 'play': { 'name': play.get_name(), 'id': to_text(play._uuid), + 'path': to_text(play.get_path()), 'duration': { 'start': current_time() } @@ -81,6 +82,7 @@ class CallbackModule(CallbackBase): 'task': { 'name': task.get_name(), 'id': to_text(task._uuid), + 'path': to_text(task.get_path()), 'duration': { 'start': current_time() }