Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
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:


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@redhat.com

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

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.