Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The total number of components on the device tab displayed in the UI does not match the actual number. #14129

Closed
penM000 opened this issue Oct 27, 2023 · 4 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@penM000
Copy link

penM000 commented Oct 27, 2023

NetBox version

v3.6.4

Python version

3.8

Steps to Reproduce

I know of two ways to generate this problem.

Method using front and rear ports

  1. Create a device with a front port and a rear port.
  2. Delete the rear port.
  3. The front port is labeled 24, but no ports exist.
    image
    image
    image

This phenomenon occurs with modules.

  1. Create a module with various components.
  2. module to the device.
  3. component is increasing and confirms that it is indeed present.
  4. Delete the module.
  5. The Interface component has been removed, but the others (console port, power port, etc.) show that there are 32, even though the component is not present.
    image
    image
    image
    image
    image

Expected Behavior

We expect the number of components to match the numbers displayed in the tabs.

Observed Behavior

Different numbers are displayed even though the component does not exist.

@penM000 penM000 added the type: bug A confirmed report of unexpected behavior in the application label Oct 27, 2023
@penM000
Copy link
Author

penM000 commented Oct 27, 2023

image
If one is added in the state of 32, the display becomes 33.
If I delete it, it just goes back to 32 and cannot be set to 0.
Please let me know how to fix this as well.

@arthanson
Copy link
Collaborator

@penM000 you can run the management command calculate_cached_counts to recalculate the counters to the correct values. There is another bug #14081 that effects removing parent elements that is currently being worked on, but the management command will recalc it to show the correct values.

@penM000
Copy link
Author

penM000 commented Nov 1, 2023

Thank you for your confirmation.
Thank you also for your help on how to correct the problem.
I am aware that this is similar to #14081. Is this ticket closed?

@arthanson
Copy link
Collaborator

Closing as dupe of #14081

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants