Project

General

Profile

Actions

Bug #38527

closed

"POST /api/job_templates/:id/clone" fails to clone a job-template

Added by Gaurav Talreja 8 days ago. Updated 5 days ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-

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"}}'

Actions #1

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
Actions #2

Updated by The Foreman Bot 6 days ago

  • Fixed in Releases foreman_remote_execution-16.0.3 added
Actions #3

Updated by Anonymous 6 days ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by The Foreman Bot 5 days ago

  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/980 added
Actions

Also available in: Atom PDF