Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1456833

Summary: Can't create bookmark for global parameters
Product: Red Hat Satellite Reporter: Stanislav Tkachenko <stkachen>
Component: SearchAssignee: Ondřej Pražák <oprazak>
Status: CLOSED ERRATA QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, egolov, mhulan, tbrisker, tstrachota
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.15.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 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 Stanislav Tkachenko 2017-05-30 13:06:43 UTC
Description of problem:
It is not possible to create bookmark for Global Parameters, neither via API nor UI.

API:
> Making HTTP POST request to https://sat6.com/api/v2/bookmarks with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}} and data {"controller": "common_parameters", "query": "\u5653\u3def\uf902\ud855\udcbf\ud849\udf20\u1d9b\ud835\udc10\ud86a\udecd\ud3da\ufa11", "public": false, "name": "uZSPlCrazx"}.
> Received HTTP 422 response: {
  "error": {"id":null,"errors":{"controller":["common_parameters is not a valid controller"]},"full_messages":["Controller common_parameters is not a valid controller"]}

UI:
After clicking on `create bookmark` modal window is opened, but after clicking on submit button page redirects to `create bookmark` page and further clicking on sumbit button ha no effect.

According to production.log in this case also `common_parameters` is used as controller:
> 2017-05-30 08:17:02 83131396 [app] [I] Started GET "/bookmarks/new?kontroller=common_parameters&query=name%20=%20123" for 10.40.204.237 at 2017-05-30 08:17:02 -0400
> 2017-05-30 08:17:02 83131396 [app] [I] Processing by BookmarksController#new as HTML
> 2017-05-30 08:17:02 83131396 [app] [I]   Parameters: {"kontroller"=>"common_parameters", "query"=>"name = 123"}
> 2017-05-30 08:17:02 83131396 [app] [I] Current user: admin (administrator)
> 2017-05-30 08:17:02 83131396 [app] [I]   Rendered bookmarks/_form.html.erb (3.0ms)
> 2017-05-30 08:17:02 83131396 [app] [I]   Rendered bookmarks/new.html.erb within layouts/application (3.5ms)
> 2017-05-30 08:17:02 83131396 [app] [I]   Rendered layouts/_application_content.html.erb (0.2ms)
> 2017-05-30 08:17:02 83131396 [app] [I]   Rendered home/_submenu.html.erb (1.8ms)
> 2017-05-30 08:17:02 83131396 [app] [I]   Rendered home/_user_dropdown.html.erb (1.4ms)
> 2017-05-30 08:17:02 83131396 [app] [I] Read fragment views/tabs_and_title_records-3 (0.2ms)
> 2017-05-30 08:17:02 83131396 [app] [I]   Rendered home/_topbar.html.erb (4.6ms)
> 2017-05-30 08:17:02 83131396 [app] [I]   Rendered layouts/base.html.erb (6.2ms)
> 2017-05-30 08:17:02 83131396 [app] [I] Completed 200 OK in 19ms (Views: 10.9ms | ActiveRecord: 1.2ms)
> 2017-05-30 08:17:06 4caa26af [app] [I] Started POST "/bookmarks" for 10.40.204.237 at 2017-05-30 08:17:06 -0400
> 2017-05-30 08:17:06 4caa26af [app] [I] Processing by BookmarksController#create as HTML
> 2017-05-30 08:17:06 4caa26af [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"FDUvxMSUQS892j3fW+NYPlNGRzozZybI/DR0SLLhZdKzqQ6GpO/0+UGE1sMTxmAUyG8fD9I3cyY6NLaZ4nBufw==", "bookmark"=>{"name"=>"name", "query"=>"name = 123", "public"=>"1", "controller"=>"common_parameters"}, "commit"=>"Submit"}


Version-Release number of selected component (if applicable):
Sat 6.3/downstream nightly:
* satellite-6.3.0-12.1.beta.el7sat.noarch
* foreman-1.15.0-0.1.RC2.el7sat.noarch

How reproducible:
Always


Steps to Reproduce:
1. Navigate to Configure / Global Parameters
2. Use search
3. Try to bookmark this search

Actual results:
Bookmark can't be created

Expected results:
Bookmark should be created


Additional info:

Comment 3 Tomer Brisker 2017-06-07 06:57:34 UTC
I confirm this issue is present also in latest upstream, cloning to redmine.

Comment 4 Tomer Brisker 2017-06-07 06:58:10 UTC
Created redmine issue http://projects.theforeman.org/issues/19947 from this bug

Comment 5 Satellite Program 2017-07-12 08:05:41 UTC
Upstream bug assigned to oprazak

Comment 6 Satellite Program 2017-07-12 08:05:45 UTC
Upstream bug assigned to oprazak

Comment 7 Satellite Program 2017-07-17 16:05:44 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19947 has been resolved.

Comment 10 Evgeni Golov 2017-08-16 10:05:38 UTC
VERIFIED

Version Tested:
Satellite 6.3.0 Snap 11
foreman-1.15.3-1.el7sat.noarch

Created two new global parameters
- asdf
- aaaa

Searched for 'asdf'
- got just the one parameter

Clicked on "bookmark this search
- bookmark was properly created

Clicked on the bookmark
- the correct results are displayed

Comment 11 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