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 1374344 - foreman_url to job template gives error message on Preview
Summary: foreman_url to job template gives error message on Preview
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1477235
TreeView+ depends on / blocked
 
Reported: 2016-09-08 13:16 UTC by Kavita
Modified: 2021-06-10 11:31 UTC (History)
11 users (show)

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


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


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16806 0 None None None 2016-10-05 12:23:10 UTC
Foreman Issue Tracker 16899 0 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):
6.2

How reproducible:
100%

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

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

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 Satellite Program 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.

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.