Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1416425 - Job template description format doesnt accept input field variables when invoked
Summary: Job template description format doesnt accept input field variables when invoked
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.2.6
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Adam Ruzicka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-25 13:20 UTC by Göran Törnqvist
Modified: 2019-09-25 20:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18298 0 None None None 2017-01-30 09:04:03 UTC

Description Göran Törnqvist 2017-01-25 13:20:45 UTC
Description of problem:
I´ve created a custom job template where I cloned the Package Action - SSH Default template to my own custom template.

As description I have MyJob %{label} and I have a input field named label in the template which I fill in with a descriptive label when I run the job.

The variable label is however not rendered when the job is invoked and all jobs are just called "MyJob ".

If I do a foreman-tail when running the job it looks like the values are passed correctly.

==> /var/log/foreman/production.log <==
2017-01-25 13:52:20 [app] [I] Started POST "/job_invocations" for 172.20.123.105 at 2017-01-25 13:52:20 +0100
2017-01-25 13:52:20 [app] [I] Processing by JobInvocationsController#create as HTML
2017-01-25 13:52:20 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"5rhjFz52yxya/eRFFaeaUhunevNauPi8pmYxCkP9gSI=", "job_invocation"=>{"job_category"=>"Packages", "providers"=>{"SSH"=>{"job_template_id"=>"247", "job_templates"=>{"93"=>{"input_values"=>"[FILTERED]", "effective_user"=>""}, "247"=>{"input_values"=>"[FILTERED]"}}}}, "description"=>"MyJob example-label", "description_override"=>"MyJob %{label}", "description_format"=>"MyJob %{label}", <snip>}

The built in templates works fine however and the variables are rendered correctly in Description format when invoked.

Version-Release number of selected component (if applicable):
Satellite 6.2.6

How reproducible:
Always

Steps to Reproduce:
1. Copy an existing template
2. Add a new input field
3. Add the input field name in Description format as: %{inputfield}

Actual results:
Description format doesn´t render variables

Expected results:
Variables should be rendered

Additional info:

Comment 3 Ivan Necas 2017-01-30 09:04:02 UTC
Created redmine issue http://projects.theforeman.org/issues/18298 from this bug

Comment 4 Ivan Necas 2017-01-30 09:05:21 UTC
I run into this issue recently and I have a fix almost ready to send. The patch should be available soon.

Comment 5 Satellite Program 2017-01-30 23:11:19 UTC
Upstream bug assigned to inecas

Comment 6 Satellite Program 2017-01-30 23:11:23 UTC
Upstream bug assigned to inecas

Comment 7 Satellite Program 2017-02-01 13:12:02 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18298 has been resolved.

Comment 8 Adam Ruzicka 2017-08-02 08:43:15 UTC
Verified.
Satellite-6.3 Snap 9
Package versions:
satellite-6.3.0-16.0.beta.el7sat.noarch
tfm-rubygem-foreman_remote_execution-1.3.3-1.fm1_15.el7sat.noarch

Input field variables are properly interpolated in the description.

Comment 9 Satellite Program 2018-02-21 16:51:07 UTC
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/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.