Skip to content

Conversation

@AdrienClairembault
Copy link
Contributor

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.

Description

Formcreator questions may reference data from the generic objects plugin:

image

Since this plugin is replaced by native custom assets in GLPI 11, we must look for the migrated itemtype instead.

References

Internal support ticket: !39700

@AdrienClairembault AdrienClairembault force-pushed the migrate-form-with-generic-object-ref branch from c86b190 to 8ff70d1 Compare October 22, 2025 11:36
@AdrienClairembault
Copy link
Contributor Author

Rebased to fix conflicts.

Copy link
Member

@cedric-anne cedric-anne left a comment

Choose a reason for hiding this comment

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

Result will not be the same whether the genericobject migration has been processed or not.
The genericobject migration import the plugin items, import the related CommonDBConnexity items, but does not update foreign keys present in other objects classes. Maybe it should.

@AdrienClairembault
Copy link
Contributor Author

Result will not be the same whether the genericobject migration has been processed or not.

I expect the generic object migration to be executed first in this case, at least it unlock the situation.

The genericobject migration import the plugin items, import the related CommonDBConnexity items, but does not update foreign keys present in other objects classes. Maybe it should.

Indeed, but it might not be easy to set up (can you do it for 11.0.2 ?)
I'd prefer merging this now and deal with this later, but it is clearly something to remember as the issue might happen for others features.

@AdrienClairembault
Copy link
Contributor Author

I'll wait for #21709 to be merged before fixing conflitcs as it will conflict on the same test file again.

@AdrienClairembault AdrienClairembault force-pushed the migrate-form-with-generic-object-ref branch from 8ff70d1 to b9a465c Compare October 31, 2025 08:41
@AdrienClairembault AdrienClairembault force-pushed the migrate-form-with-generic-object-ref branch from b9a465c to 37a25c9 Compare October 31, 2025 09:24
@AdrienClairembault
Copy link
Contributor Author

Rebased to fix conflicts.

Copy link
Member

@cedric-anne cedric-anne left a comment

Choose a reason for hiding this comment

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

I am working on a more global fix to handle update of foreign keys during the genericobject migration.

@AdrienClairembault
Copy link
Contributor Author

Replaced by #21768

@AdrienClairembault AdrienClairembault deleted the migrate-form-with-generic-object-ref branch November 4, 2025 15:08
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.

3 participants