Bug #26671
closedUnable to import job templates that have been exported from Foreman.
Description
Description of problem:
Unable to import job templates that have been exported from Foreman.
Steps to Reproduce:
==================
1. Log into the Gui--> Hosts--> Job Teamplates---> Export a job template (I used 'Install Group - Katello SSH Default').
2. Then imported the same job template. I used the Gui and check-marked the Overwrite box.
Actual results:
Got the below exception:-
========================
Unable to save
ERF45-3514 [JobTemplate::NonUniqueInputsError]: Duplicated inputs detected: ["pre_script", "package", "post_script"]
Expected results:
The template should have been imported without any exceptions.
Additional info:
Tested the same with CLI:-
[root@foreman ~]# hammer job-template export --name "Install Package - Katello SSH Default" > exporttest
[root@foreman ~]# hammer job-template import --file ./exporttest --overwrite true
Could not import the job template:
ERF45-3514 [JobTemplate::NonUniqueInputsError]: Duplicated inputs detected: ["pre_script", "package", "post_script"]