diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 99c9a591c3..71c854d990 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -1262,7 +1262,8 @@ class JobSerializer(UnifiedJobSerializer, JobOptionsSerializer): except JobTemplate.DoesNotExist: self._errors = {'job_template': 'Invalid job template'} return - # Don't auto-populate name or description. + data.setdefault('name', job_template.name) + data.setdefault('description', job_template.description) data.setdefault('job_type', job_template.job_type) if job_template.inventory: data.setdefault('inventory', job_template.inventory.pk) diff --git a/awx/main/tests/jobs.py b/awx/main/tests/jobs.py index cf8ff56926..5aa0455bdb 100644 --- a/awx/main/tests/jobs.py +++ b/awx/main/tests/jobs.py @@ -627,7 +627,6 @@ class JobTemplateTest(BaseJobTestMixin, django.test.TestCase): jt = self.jt_eng_run url = reverse('api:job_template_jobs_list', args=(jt.pk,)) data = dict( - name='new job from template', credential=self.cred_bob.pk, )