Bug #18260

Choose different org will result in the same org's host number change in organizations page

Added by Daniel Lobato Garcia 8 months ago. Updated 7 months ago.

Assigned To:Daniel Lobato Garcia
Category:Organizations and Locations
Target version:Team Daniel - Iteration 9
Difficulty: Bugzilla link:1415025
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4234
Story points-
Velocity based estimate-
Release1.14.1Release relationshipAuto


Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1415025
Description of problem:
In organizations page, when you select a org, the other org's host number is wrong.

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

How reproducible:

Steps to Reproduce:
1. In satellite webUI, Create a new org named org1.
2. Registered 7 hosts to org1, make sure no host on Default_organization.
3. Go to "Management organization", choose org1, it's correct to show org1's host number is 7, please see screenshot org1.jpeg.
4. Go to "Management organization", choose Default_organization, check the org1's host number.

Actual results:
It will show org1's host number is 0. please see screenshot default_org.jpeg

Expected results:
No matter what org is choosen in organization page, the host's number in the same org shouldn't change. the host's number in org1 should always 7.

Additional info:

Related issues

Related to Foreman - Bug #12193: Deadlock occuring when creating host Closed 10/16/2015

Associated revisions

Revision cc81d993
Added by Daniel Lobato Garcia 8 months ago

Fixes #18260 - Display proper organizations count on table

If the user is scoped to taxonomy "A", "Host.count" will only return
hosts in that taxonomy. That is correct. However there is a usecase
where we want to display the hosts count regardless of the current

The table for locations and organizations was showing the "Host.count"
scoped to the current taxonomy, so it would show 0 everywhere but in the
current taxonomy.

The fix is to make the helper aware of this issue, and show the unscoped
Host.count when displaying the organizations/locations table


#1 Updated by Dominic Cleal 8 months ago

  • Related to Bug #12193: Deadlock occuring when creating host added

#2 Updated by Dominic Cleal 8 months ago

  • Category set to Organizations and Locations

#3 Updated by The Foreman Bot 8 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/4234 added

#4 Updated by Anonymous 8 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal 8 months ago

  • Release set to 1.14.1

#6 Updated by Daniel Lobato Garcia 7 months ago

  • Target version set to Team Daniel - Iteration 9

Also available in: Atom PDF