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.

Web UI
Target version:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:


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 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- `block in make_lambda'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport- `block (2 levels) in halting_and_conditional'
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack- `block (2 levels) in <module:Callbacks>'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport- `block in halting_and_conditional'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport- `block in invoke_before'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport- `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 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

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


#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 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 added

Also available in: Atom PDF