Bug 1660140

Summary: User input not added to script header
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: ReportingAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: inecas, mhulan, mmccune, oprazak
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-19 10:10:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukáš Hellebrandt 2018-12-17 15:37:29 UTC
Description of problem:
After adding a user input, header of script is not changed in the script edit textarea (or in "hammer report-template dump ..."), however, when exporting it, the new input is included there.

I would accept having to include it in the script manually in both cases but this behavior is inconsistent and doesn't seem right to me.

This bug is also true for reporting templates.

Version-Release number of selected component (if applicable):
Tested on Sat 6.5 snap 7

How reproducible:
Deterministic

Steps to Reproduce through WebUI:
1. Clone some report template
2. Edit the cloned report template, in the Inputs tab, add some input
3. After submitting, open in for editing again

Actual results:
The script doesn't contain the new input declared in its header

Expected results:
I think the script contents should be the same in the textarea and in the export

Comment 3 Marek Hulan 2018-12-19 10:10:05 UTC
Lukáš I'm not sure whether you've seen my reply but I believe this is not a bug. The "script header" you talk about is a comment. We store metadata into it that are useful on importing the template. There's a PR pending already to actually strip it from the template content so user will not see that at all. On export you can choose one of three modes (foreman_templates plugin) that would either generate such comment for you from scratch, remove it entirely or keep it as it is. The export functionality in core always generate new metadata, so it can be reimported back (or to different Satellite instance). This is not related to report templates, this is a behavior that we have for all templates for a while.

I'm closing this as NOTABUG for now.