Description of problem: If you use the upload functionality for a template, only the template text is used. We need a way for a user to export/import a template with all the metadata. Version-Release number of selected component (if applicable): 6.2 latest snap How reproducible: Always Steps to Reproduce: 1. Attempt to export or import a job template Actual results: Metadata not included Expected results: Metadata included (inputs, etc). Additional info:
Moving to POST since upstream bug http://projects.theforeman.org/issues/13922 has been closed ------------- Anonymous Applied in changeset commit:foreman_plugin|cfab668395d40b98eeb01c1b2d050031452f6bcc.
While this is great (not having to create input fields manually), this change does make adding this metadata mandatory. Is that intentional? Asking because a template I made earlier doesn't import anymore (ISE), unless I add some metadata.
There was no import button before this change, if you have just the contents of a template like a script, use the upload button in the New template form. Import exports a particular format, we can't import an entire template without metadata, like the name.
It could be possible to make importing without metadata take you to a blank form, but that should be a separate BZ I think.
Failed QA in Satellite 6.2 Beta Snap 12. The template exported correctly. However, when attempting to create a new template from the exported template file, the form data was not correctly populated. The text of the template was populated with the contents of the file instead. See attached image.
Created attachment 1160638 [details] Incorrect file import
How did you test this? Please use the actual button labeled *IMPORT* on the main job templates index page, or the hammer cli import command. The browse button does not import the template, as discussed in comment #3 and #4. It's a limitation of how we get the form from foreman currently.
After following Stephen's guidance, the template upload worked correctly. Verified in Satellite 6.2 Beta Snap 12.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501