Skip to content

[main] Fix: keep models reachable when their entity is deleted - #725

Open
glpi-project[bot] wants to merge 1 commit into
mainfrom
forward-port/722-to-main
Open

glpi-project[bot] wants to merge 1 commit into
mainfrom
forward-port/722-to-main

Conversation

@glpi-project

@glpi-project glpi-project Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Forward-port of #722 to main.

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !47891
  • When an entity was deleted, its models kept pointing to the missing entity and could no longer be opened or edited, even by a super-admin.
  • The plugin now declares this entity relation to GLPI, so an entity that still holds models is seen as used: deleting it from the entity form requires a replacement entity, and the models are moved to it.
  • The related GLPI core fix (Fix(Entity): prevent deleting an entity still in use glpi-project/glpi#26453) extends this check to massive actions and API calls.

Screenshots (if appropriate):

@glpi-project

glpi-project Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin forward-port/722-to-main
git worktree add --checkout .worktree/forward-port/722-to-main forward-port/722-to-main
cd .worktree/forward-port/722-to-main
git reset --hard HEAD^
git cherry-pick -x 5a20b6337cd45ac3d722813636b837da39c26335

@Rom1-B
Rom1-B force-pushed the forward-port/722-to-main branch from 1128f3c to 8b0ebc7 Compare November 30, 2026 07:49
@Rom1-B
Rom1-B marked this pull request as ready for review November 30, 2026 07:49
@Rom1-B
Rom1-B requested review from a team, Mary-Clb, Rom1-B and RomainLvr and removed request for a team November 30, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant