diff --git a/awx/main/models/notifications.py b/awx/main/models/notifications.py index 74a9896385..1fd494ff20 100644 --- a/awx/main/models/notifications.py +++ b/awx/main/models/notifications.py @@ -280,6 +280,7 @@ class JobNotificationMixin(object): {'unified_job_template': ['id', 'name', 'description', 'unified_job_type']}, {'instance_group': ['name', 'id']}, {'created_by': ['id', 'username', 'first_name', 'last_name']}, + {'schedule': ['id', 'name', 'description', 'next_run']}, {'labels': ['count', 'results']}]}] @classmethod @@ -344,6 +345,10 @@ class JobNotificationMixin(object): 'name': 'Stub project', 'scm_type': 'git', 'status': 'successful'}, + 'schedule': {'description': 'Sample schedule', + 'id': 42, + 'name': 'Stub schedule', + 'next_run': '2038-01-01T00:00:00Z'}, 'unified_job_template': {'description': 'Sample unified job template description', 'id': 39, 'name': 'Stub Job Template', diff --git a/awx/main/tests/functional/models/test_notifications.py b/awx/main/tests/functional/models/test_notifications.py index 5e5f19f0fd..caf46c7d09 100644 --- a/awx/main/tests/functional/models/test_notifications.py +++ b/awx/main/tests/functional/models/test_notifications.py @@ -72,6 +72,10 @@ class TestJobNotificationMixin(object): 'name': str, 'scm_type': str, 'status': str}, + 'schedule': {'description': str, + 'id': int, + 'name': str, + 'next_run': str}, 'unified_job_template': {'description': str, 'id': int, 'name': str,