Fix(Core): fix migration error when container are related to Generico…#1045
Merged
Conversation
2 tasks
Contributor
Author
|
waiting from community feedback |
MyvTsv
approved these changes
Oct 20, 2025
Rom1-B
requested changes
Oct 21, 2025
Rom1-B
approved these changes
Oct 21, 2025
Contributor
Author
|
I’ve added an additional check. Now, before verifying whether the GenericObject plugin is at the correct version (based on the presence of its table), I first check if any containers are actually linked to GenericObject. This change was motivated by a support case: the client had generic objects, and the Fields plugin was crashing because the GenericObject End of Life Updater plugin wasn’t enabled — even though no containers were associated with GenericObject. |
Rom1-B
approved these changes
Oct 23, 2025
d99961c to
c666898
Compare
…bject Model or Type
Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
c666898 to
2b8edfb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…bject Model or Type
Checklist before requesting a review
Please delete options that are not relevant.
Description
If a container field is attached to a model or type derived from a GenericObject,
the migration of the container to CustomAssets fails because it does not take the model or type into account.
In GLPI:
Glpi\CustomAsset\CarAssetGlpi\CustomAsset\CarAssetModelGlpi\CustomAsset\CarAssetTypeThe current migration method does not consider that the container may be attached to a model or type of a GenericObject.
Screenshots (if appropriate):