Bug #38527
closed"POST /api/job_templates/:id/clone" fails to clone a job-template
Description
Description of problem:
How reproducible:
Always
Is this issue a regression from an earlier version:
No
Steps to Reproduce:
1. Setup latest Foreman and fetch the ID of any job-template to clone, for example "Ansible Roles - Ansible Default"
2. # curl -X POST -k -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Basic <token>' -i 'https://example.redhat.com/api/job_templates/<jobtemplate-id>/clone' --data '{"name": "Cloned Template Name"}'
.
.
{
"error": {"id":<jobtemplate-id>,"errors":
{"base":["This template is locked. Please clone it to a new template to customize."]}
,"full_messages":["This template is locked. Please clone it to a new template to customize."]}
Actual behavior:
JobTemplate clone fails with "This template is locked. Please clone it to a new template to customize"
Expected behavior:
JobTemplate clone works without any errors
Business Impact / Additional info:
Also, tried passing data like below in curl command and it also fails with same error,
--data '{"job_template": {"name": "Cloned Template Name"}}'
Updated by The Foreman Bot 8 days ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_remote_execution/pull/979 added
Updated by The Foreman Bot 6 days ago
- Fixed in Releases foreman_remote_execution-16.0.3 added
Updated by Anonymous 6 days ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_plugin|953f422fb82d3bbc31d1065ce8defb617a92c33d.
Updated by The Foreman Bot 5 days ago
- Pull request https://github.com/theforeman/foreman_remote_execution/pull/980 added