Project

General

Profile

Bug #34416

Organization context fails to change in web UI

Added by Ondřej Ezr 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2045854

The problem appears to happen for newly created orgs.
This seems to be "caused" by #29474 where we've stopped to update title on create.
Together with wrong condition in `set_title` we end up with empty title in the database.

Description of problem:

On Foreman with Katello many test organizations created, I created an org "proxy-test", I tried a few times to select that org, but the web UI context menu keeps showing Any Organization

Version-Release number of selected component (if applicable):
Foreman 3.1

How reproducible:
not sure

Actual results:
web UI context menu keeps showing Any Organization

Expected results:
web UI context menu shows org you select

Associated revisions

Revision bcd18b6c (diff)
Added by Ondřej Ezr 3 months ago

Fixes #34416 - taxonomy title in ForemanContext

When creating new org/loc we did not save the title there.
In the app_metadata for the frontend we were taking these directly from db, so it disallowed the calculation on runtime.

This was wrong from b0d5a6c9b882fa078379ed90f8610ff021978e6b, but only when we switched to using these in the TaxonomySwitcher it started to exhibit in this bug.
Probably 299c2976888bce605d29bbecbc5e4cab4cfb9fc5 was where this actually broke, but only for new orgs, so it was not discovered.

This resolves firstly the issue of empty title in the database and secondly the issue not using methods to retrieve data, which we always should.

History

#1 Updated by Ondřej Ezr 3 months ago

  • Target version set to 3.1.2
  • Subject changed from Organization context fails to change in web UI to Organization context fails to change in web UI

#2 Updated by The Foreman Bot 3 months ago

  • Assignee set to Ondřej Ezr
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/9100 added

#3 Updated by Ondřej Ezr 3 months ago

This is probably an issue since #30331, where we started to use current taxonomies from ForemanContext.

#4 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 3.3.0 added

#5 Updated by The Foreman Bot 3 months ago

  • Pull request https://github.com/theforeman/foreman/pull/9106 added

#6 Updated by The Foreman Bot 3 months ago

  • Pull request https://github.com/theforeman/foreman/pull/9107 added

#7 Updated by Ondřej Ezr 3 months ago

  • Status changed from Ready For Testing to Closed

#8 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 3.2.1 added

#9 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 3.1.2 added

#10 Updated by Ondřej Ezr 3 months ago

  • Fixed in Releases 3.2.0 added
  • Fixed in Releases deleted (3.2.1)

Also available in: Atom PDF