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 1635305 - Subscriptions details page does not handle Org switch correctly.
Summary: Subscriptions details page does not handle Org switch correctly.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.6.0
Assignee: Jeremy Lenz
QA Contact: Perry Gagne
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-02 14:55 UTC by Perry Gagne
Modified: 2019-10-22 19:51 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-katello-3.12.0.15-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 19:51:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25113 0 Normal Closed Subscriptions details page does not handle Org switch correctly. 2021-01-07 14:31:00 UTC
Red Hat Bugzilla 1609817 0 unspecified CLOSED Using the Mast Head Org Switcher and the in page Organization Selection dropdown produces unpredictable results 2021-02-22 00:41:40 UTC

Internal Links: 1609817

Description Perry Gagne 2018-10-02 14:55:49 UTC
Description of problem:
I found this while verifying bz 1609817, It seems to be similar to that bug but happens when you select a specific subscription to view details, then try to switch the org.

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


How reproducible: Always

Steps to Reproduce:

--Flow 1--
1. Start with default org. 
2. On subscriptions page select one of the subscription 
3. Using the mast head org switcher, change to another org with different subscriptions.

Actual Results:
The details for the subscription still show. Clicking the enabled products tab shows it as empty. 

See Screen recording here:
https://drive.google.com/open?id=1fdDT-LsEwNRioPON6eHaHICpz8kiFYOl

Expected results
User is directed to the main subscriptions page for the selected org. 

--Flow 2--
1. Start with default org 
2. On subscriptions page select one of the subscriptions
3. Using mast head org switcher, select  "Any Organization"

Actual Results:

2 errors are displayed with message "Organization with id undefined not found"

See screen recording here:
https://drive.google.com/open?id=1baKSgSWnx6w-vZWQrU-or9v8ZCCyt3i5

Expected Results:
User is directed to org selection page.


Additional info:
I added the screen recordings to this folder, if you find additional examples please add upload them to this folder. 
https://drive.google.com/drive/folders/1YnL3EJrZbVSePKTJ7ciBMojjxfpvWA9Z?usp=sharing

Comment 4 Walden Raines 2018-10-03 14:03:14 UTC
Created redmine issue https://projects.theforeman.org/issues/25113 from this bug

Comment 5 Satellite Program 2018-10-31 18:02:08 UTC
Upstream bug assigned to afeferku

Comment 6 Walden Raines 2019-03-14 18:54:42 UTC
The PR [1] is based on some subscription page refactoring that was done upstream.  It will likely be much easier and safer to apply this to a future release such as 6.6.  Marking as untriaged to get another look at triaging this for a future release since there is a workaround for now (reload the page).

[1] https://github.com/Katello/katello/pull/8022/

Comment 8 Bryan Kearney 2019-03-28 18:01:49 UTC
Upstream bug assigned to jomitsch

Comment 9 Bryan Kearney 2019-03-28 18:01:51 UTC
Upstream bug assigned to jomitsch

Comment 11 Bryan Kearney 2019-06-24 22:01:43 UTC
Upstream bug assigned to jomitsch

Comment 12 Bryan Kearney 2019-06-24 22:01:45 UTC
Upstream bug assigned to jomitsch

Comment 13 Jeremy Lenz 2019-07-25 20:29:01 UTC
The attached PR addresses Flow 2 (the 'id undefined' errors):

https://github.com/Katello/katello/pull/8227

Flow 1 happens because the page doesn't check for permission to view the subscription details, because we don't have easy access to that permission data.
Per the discussion on the PR, Flow 1 will be addressed as part of a more comprehensive look at how Katello deals with permissions.

Comment 14 Walden Raines 2019-07-26 15:29:26 UTC
(In reply to Jeremy from comment #13)
> The attached PR addresses Flow 2 (the 'id undefined' errors):
> 
> https://github.com/Katello/katello/pull/8227
> 
> Flow 1 happens because the page doesn't check for permission to view the
> subscription details, because we don't have easy access to that permission
> data.
> Per the discussion on the PR, Flow 1 will be addressed as part of a more
> comprehensive look at how Katello deals with permissions.

Flow #1 will be fixed by https://projects.theforeman.org/issues/27450 which will prevent users from accessing pages they don't have permission to view.

Organization switching in general will also be helped by https://projects.theforeman.org/issues/27451, which suggests that we rewrite the organization switcher in foreman in react so that it stores the organization in the foreman redux store. Once we do that we can fix katello to use that store and we'll only have one single source of truth for what organization is selected.  

Both of these efforts are too large for 6.6 so look for them (hopefully) in 6.7

TL;DR: only flow 2 is fixed as part of this BZ.

Comment 15 Bryan Kearney 2019-07-26 16:01:44 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25113 has been resolved.

Comment 18 Perry Gagne 2019-08-26 19:03:35 UTC
Verified fix in 6.6 snap 17. 

Verified that Flow 2 described above now redirects the user to the "Select an organization" page as expected. 

As for flow 1 I filed bz 1745736.

Comment 19 Jeremy Lenz 2019-09-04 16:59:42 UTC
This should be resolved. Please let me know if any additional info is needed.

Comment 20 Bryan Kearney 2019-10-22 19:51:08 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-2019:3172


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