Project

General

Profile

Bug #30580

Content -> Product doesn't work when no organization is selected

Added by Partha Aji about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web UI
Target version:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Steps to Reproduce:
1, Switch to 'Any Organization' in the org selector
2. Navigate to Content -> Product page

Actual results:
No product listed

and the production.log shows below traces:

2020-07-30T09:58:52 [I|app|cc4095ec] Started GET "/katello/api/v2/products?enabled=true&organization_id=&page=1&paged=true&per_page=50&search=&sort_by=name&sort_order=ASC" for 127.0.0.1 at 2020-07-30 09:58:52 +0530
2020-07-30T09:58:52 [I|app|cc4095ec] Processing by Katello::Api::V2::ProductsController#index as HTML
2020-07-30T09:58:52 [I|app|cc4095ec] Parameters: {"enabled"=>"true", "organization_id"=>"", "page"=>"1", "paged"=>"true", "per_page"=>"50", "search"=>"", "sort_by"=>"name", "sort_order"=>"ASC", "api_version"=>"v2"}
2020-07-30T09:58:52 [E|app|cc4095ec] Katello::HttpErrors::NotFound: Couldn't find organization ''
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.rc4.1/app/controllers/katello/api/v2/api_controller.rb:161:in `find_optional_organization'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.rc4.1/app/controllers/katello/api/v2/api_controller.rb:141:in `find_organization'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:428:in `block in make_lambda'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:181:in `block (2 levels) in halting_and_conditional'
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:182:in `block in halting_and_conditional'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:513:in `each'

Expected results:
Please select an Organization

Additional info:

Associated revisions

Revision 0e9ae146 (diff)
Added by Partha Aji almost 2 years ago

Fixes #30580 - Correctly handles org selection (#8877)

The fix for https://projects.theforeman.org/issues/28998 upgraded
angular ui router to 1.0.25. This was a major update and there were some
deprecated changes deleted.
Things like org-selector and other places in
the bastion code used events like stateChangeStart or stateChangeError
or stateChangeSuccess. Support for these got removed in the update.

This commit adds the necessary stateEvents.js file and module which was
added as a backward compatibility adapter script.
It adds the script below to the vendors and loads them in memory
https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/1.0.25/stateEvents.js

This commit allows for Any Organization content->products page to
properly redirect user to the org selector.

History

#1 Updated by Partha Aji about 2 years ago

  • Bugzilla link set to 1861970

#2 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8877 added

#3 Updated by Ian Ballou almost 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.17.0

#4 Updated by The Foreman Bot almost 2 years ago

  • Fixed in Releases Katello 4.0.0 added

#5 Updated by Partha Aji almost 2 years ago

  • Status changed from Ready For Testing to Closed

#6 Updated by The Foreman Bot almost 2 years ago

  • Pull request https://github.com/Katello/katello/pull/8950 added

Also available in: Atom PDF