Skip to content

Fix positions not reset between rack items when checking model update#24261

Merged
cedric-anne merged 2 commits into
glpi-project:11.0/bugfixesfrom
Herafia:fix-rack-model-positions-check-reset
May 28, 2026
Merged

Fix positions not reset between rack items when checking model update#24261
cedric-anne merged 2 commits into
glpi-project:11.0/bugfixesfrom
Herafia:fix-rack-model-positions-check-reset

Conversation

@Herafia

@Herafia Herafia commented May 20, 2026

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • It fixes !44135
  • When updating a DC model's required_units, $positionsToCheck was initialized outside the foreach loop, causing positions from previous rack items to accumulate and trigger false-positive conflicts on unrelated racks. Moving the initialization inside the loop ensures each rack item is checked independently.

Screenshots (if appropriate):

@Herafia Herafia requested review from Rom1-B, ccailly and stonebuzz May 20, 2026 10:21
@Herafia Herafia self-assigned this May 20, 2026

@Rom1-B Rom1-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add test?

@stonebuzz stonebuzz requested review from cedric-anne and trasher May 27, 2026 14:18
@cedric-anne cedric-anne merged commit f417a9d into glpi-project:11.0/bugfixes May 28, 2026
12 checks passed
@cedric-anne cedric-anne added this to the 11.0.8 milestone May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CommonDCModelDropdown::checkForRackIssues() falsely blocks required_units increase when the same model is used in multiple racks

4 participants