Bug 1374344 - foreman_url to job template gives error message on Preview
Summary: foreman_url to job template gives error message on Preview
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Remote Execution
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact:
Depends On:
Blocks: 1477235
TreeView+ depends on / blocked
Reported: 2016-09-08 13:16 UTC by Kavita
Modified: 2019-04-01 20:27 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1477235 (view as bug list)
Last Closed: 2018-02-21 16:49:54 UTC

Attachments (Terms of Use)
Screenshot of fixed issue (34.91 KB, image/png)
2017-08-01 14:32 UTC, Oleksandr Shtaier
no flags Details

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 16806 None None None 2016-10-05 12:23:10 UTC
Foreman Issue Tracker 16899 None None None 2016-10-13 12:39:27 UTC

Description Kavita 2016-09-08 13:16:21 UTC
Description of problem:
When you add foreman_url to Job Template, save it. On 'Preview' button click, instead of template preview it will give you warning with error undefined method 'url_for'.

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

How reproducible:

Steps to Reproduce:
1. Go to Hosts -> Job Templates
2. Create new template
3. Add below code-
 <%= foreman_url('built') %>
4. Save and click on 'Preview'

Actual results:

Giving warning - 
Problem with previewing the template: error during rendering: undefined method `url_for' for #<InputTemplateRenderer:0x007f7562d01d88>. Note that you must save template input changes before you try to preview it.

Expected results:

It should display the preview of that template. 

Additional info:

Comment 2 Marek Hulan 2016-10-05 12:23:08 UTC
Created redmine issue http://projects.theforeman.org/issues/16806 from this bug

Comment 3 Bryan Kearney 2016-10-05 14:09:31 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 4 Bryan Kearney 2016-10-05 14:09:34 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 5 Bryan Kearney 2016-10-06 08:09:25 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16806 has been resolved.

Comment 6 Marek Hulan 2016-10-13 12:39:59 UTC
Both patches are needed.

Comment 7 Bryan Kearney 2016-10-13 16:08:58 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16899 has been resolved.

Comment 18 Bryan Kearney 2017-01-05 20:39:38 UTC
I am fine with 6.2.z for this.

Comment 20 Oleksandr Shtaier 2017-08-01 14:31:46 UTC
Functionality verified by test automation scripts. And it works fine for 6.3 (but not on 6.2.11 -> so cloned BZ to track progress for 6.2)

Comment 21 Oleksandr Shtaier 2017-08-01 14:32:06 UTC
Created attachment 1307630 [details]
Screenshot of fixed issue

Comment 23 pm-sat@redhat.com 2018-02-21 16:49:54 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.


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