Repository: glpi-project/glpi (PHP)

Issue:
access submitted forms generated with formcreators
### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Version

11.0.0

### Bug description

migrated forms from formcreators to native forms, but now i can't see the previous submitted forms, whre could locate the previous submitted forms?

### Relevant log output

```shell

```

### Page URL

_No response_

### Steps To reproduce

1. updated to glpi 11
2. migrate formcreators to native with php bin/console migration:formcreator_plugin_to_core
3. i can see the migrated forms
4. i can't locate the previous submitted forms with formcreator plugin

### Your GLPI setup information

<details><summary>GLPI information</summary><pre>GLPI: 11.0.0 ( =&gt; /var/www/html/glpi)
Installation mode: TARBALL
Current language: es_MX</pre></details><details><summary>Server</summary><pre>Operating system: Linux glpisistemas 4.18.0-553.69.1.el8_10.x86_64 #​1 SMP Mon Aug 11 07:22:08 EDT 2025 x86_64

PHP: 8.2.29 fpm-fcgi

PHP extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, random, Reflection, SPL, session, standard,
cgi-fcgi, bcmath, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imap, intl, ldap, exif, mysqlnd,
PDO, Phar, SimpleXML, snmp, sockets, sodium, sqlite3, tokenizer, xml, xmlwriter, xsl, mysqli, pdo_mysql, pdo_sqlite, xmlreader,
xmlrpc, zip, apcu, Zend OPcache

Setup: disable_functions=&quot;&quot; max_execution_time=&quot;30&quot; max_input_vars=&quot;1000&quot; memory_limit=&quot;128M&quot; post_max_size=&quot;8M&quot;
session.cookie_secure=&quot;1&quot; session.cookie_httponly=&quot;1&quot; session.cookie_samesite=&quot;&quot; session.save_handler=&quot;files&quot;
upload_max_filesize=&quot;10M&quot; 

Web server: Apache/2.4.37 (AlmaLinux) OpenSSL/1.1.1k ()

User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0

Database:
   
Server Software: MariaDB Server
   
Server Version: 10.6.23-MariaDB
   
Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
   
Host info: Localhost via UNIX socket

Requirements:
PHP version (8.2.29) is supported.
OS and PHP are relying on 64 bits integers.
Sessions configuration is OK.
Allocated memory is sufficient.
Following extensions are installed: dom, fileinfo, filter, libxml, simplexml, tokenizer, xmlreader,
xmlwriter.
mysqli extension is installed
curl extension is installed
gd extension is installed
intl extension is installed
mbstring extension is installed
zlib extension is installed
bcmath extension is installed
The constant
SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
openssl extension is installed
Database engine version (10.6.23) is
supported.
The log file has been created successfully.
Write access to /var/lib/glpi/_cache has been validated.
Write access to /var/lib/glpi/_cron has been validated.
Write access to /var/lib/glpi has been validated.
Write access to /var/lib/glpi/_graphs has been validated.
Write access to /var/lib/glpi/_lock has been validated.
Write access to /var/lib/glpi/_pictures has been validated.
Write access to /var/lib/glpi/_plugins has been validated.
Write access to /var/lib/glpi/_rss has been validated.
Write access to /var/lib/glpi/_sessions has been validated.
Write access to /var/lib/glpi/_tmp has been validated.
Write access to /var/lib/glpi/_uploads has been validated.
SELinux configuration is OK.

Sessions configuration is secured.
exif extension is installed
ldap extension is installed
Following extensions are installed: bz2,
Phar, zip.
Zend OPcache extension is installed
Following extensions are installed:
ctype, iconv, sodium.
Write access to
/var/www/html/glpi/marketplace has been validated.
Timezones seems loaded in database.</pre></details><details><summary>GLPI constants</summary><pre>GLPI_ROOT: &quot;/var/www/html/glpi&quot;
GLPI_VERSION: &quot;11.0.0&quot;
GLPI_SCHEMA_VERSION: &quot;11.0.0@ea2dbba0e1edbf5128d73bdb23c2c9b9f68468ba&quot;
GLPI_FILES_VERSION: &quot;11.0.0-f682f73d&quot;
GLPI_MIN_PHP: &quot;8.2&quot;
GLPI_MAX_PHP: &quot;8.5&quot;
GLPI_YEAR: &quot;2025&quot;
GLPI_I18N_DIR: &quot;/var/www/html/glpi/locales&quot;
GLPI_CONFIG_DIR: &quot;/etc/glpi/&quot;
GLPI_VAR_DIR: &quot;/var/lib/glpi&quot;
GLPI_LOG_DIR: &quot;/var/log/glpi&quot;
GLPI_ENVIRONMENT_TYPE: &quot;production&quot;
GLPI_MARKETPLACE_DIR: &quot;/var/www/html/glpi/marketplace&quot;
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: false
GLPI_SERVERSIDE_URL_ALLOWLIST: [&quot;~^\n                        (http|https|feed)://                                          
     # protocol\n                        (\n                            (?:\n                               
(?:xn--[a-z0-9-]++\\.)*+xn--[a-z0-9-]++                      # a domain name using punycode\n                                   
|\n                                (?:[\\pL\\pN\\pS\\pM\\-\\_]++\\.)+[\\pL\\pN\\pM]++                    # a multi-level domain
name\n                                    |\n                                [a-z0-9\\-\\_]++                                   
          # a single-level domain name\n                            )\\.?\n                                |                    
                                      # or\n                            \\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}               
              # an IP address\n                                |                                                           #
or\n                            \\[\n                               
(?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::))))\n
                           \\]                                                              # an IPv6 address\n                 
      )\n                        (?:/ (?:[\\pL\\pN\\pS\\pM\\-._\\~!$&amp;&#39;()*+,;=:@]|%[0-9A-Fa-f]{2})* )*     # a path\n   
                    (?:\\? (?:[\\pL\\pN\\-._\\~!$&amp;&#39;\\[\\]()*+,;=:@/?]|%[0-9A-Fa-f]{2})* )?    # a query (optional)\n   
                $~ixuD&quot;]
GLPI_DISALLOWED_UPLOADS_PATTERN: &quot;/\\.(php\\d*|phar)$/i&quot;
GLPI_TELEMETRY_URI: &quot;https://telemetry.glpi-project.org&quot;
GLPI_INSTALL_MODE: &quot;TARBALL&quot;
GLPI_NETWORK_MAIL: &quot;glpi@teclib.com&quot;
GLPI_NETWORK_SERVICES: &quot;https://services.glpi-network.com&quot;
GLPI_MARKETPLACE_ENABLE: 3
GLPI_MARKETPLACE_PRERELEASES: false
GLPI_MARKETPLACE_ALLOW_OVERRIDE: true
GLPI_MARKETPLACE_MANUAL_DOWNLOADS: true
GLPI_USER_AGENT_EXTRA_COMMENTS: &quot;&quot;
GLPI_DOCUMENTATION_ROOT_URL: &quot;https://links.glpi-project.org&quot;
GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: &quot;1&quot;
GLPI_LOG_LVL: &quot;warning&quot;
GLPI_SKIP_UPDATES: false
GLPI_STRICT_ENV: false
GLPI_AJAX_DASHBOARD: &quot;1&quot;
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_CENTRAL_WARNINGS: &quot;1&quot;
GLPI_SYSTEM_CRON: false
GLPI_TEXT_MAXSIZE: &quot;4000&quot;
GLPI_WEBHOOK_ALLOW_RESPONSE_SAVING: &quot;0&quot;
GLPI_WEBHOOK_CRA_MANDATORY: false
GLPI_ALTCHA_MODE: &quot;interactive&quot;
GLPI_ALTCHA_MAX_NUMBER: 50000
GLPI_ALTCHA_EXPIRATION_INTERVAL: &quot;PT20M&quot;
GLPI_DOC_DIR: &quot;/var/lib/glpi&quot;
GLPI_CACHE_DIR: &quot;/var/lib/glpi/_cache&quot;
GLPI_CRON_DIR: &quot;/var/lib/glpi/_cron&quot;
GLPI_GRAPH_DIR: &quot;/var/lib/glpi/_graphs&quot;
GLPI_LOCAL_I18N_DIR: &quot;/var/lib/glpi/_locales&quot;
GLPI_LOCK_DIR: &quot;/var/lib/glpi/_lock&quot;
GLPI_PICTURE_DIR: &quot;/var/lib/glpi/_pictures&quot;
GLPI_PLUGIN_DOC_DIR: &quot;/var/lib/glpi/_plugins&quot;
GLPI_RSS_DIR: &quot;/var/lib/glpi/_rss&quot;
GLPI_SESSION_DIR: &quot;/var/lib/glpi/_sessions&quot;
GLPI_TMP_DIR: &quot;/var/lib/glpi/_tmp&quot;
GLPI_UPLOAD_DIR: &quot;/var/lib/glpi/_uploads&quot;
GLPI_INVENTORY_DIR: &quot;/var/lib/glpi/_inventories&quot;
GLPI_THEMES_DIR: &quot;/var/lib/glpi/_themes&quot;
GLPI_PLUGINS_DIRECTORIES: [&quot;/var/www/html/glpi/marketplace&quot;,&quot;/var/www/html/glpi/plugins&quot;]
GLPI_NETWORK_REGISTRATION_API_URL: &quot;https://services.glpi-network.com/api/registration/&quot;
GLPI_MARKETPLACE_PLUGINS_API_URI: &quot;https://services.glpi-network.com/api/marketplace/&quot;</pre></details><details><summary>Plugins list</summary><pre>accounts             Name: Accounts                       Version: 3.1.1      State: Activado                                
Install Method: Marketplace
activity             Name: Activities                     Version: 3.2.3      State: Activado                                
Install Method: Marketplace
actualtime           Name: ActualTime                     Version: 3.2.0      State: Instalado / no activado                 
Install Method: Marketplace
fields               Name: Additional fields              Version: 1.22.2     State: Activado                                
Install Method: Marketplace
advancedforms        Name: advancedforms                  Version: 1.0.0      State: Activado                                
Install Method: Marketplace
advancedplanning     Name: advancedplanning               Version: 1.1.1      State: Instalado / no activado                 
Install Method: Marketplace
news                 Name: Alerts                         Version: 1.13.0     State: Activado                                
Install Method: Marketplace
barcode              Name: Barcode                        Version: 2.7.1      State: Instalado / no activado                 
Install Method: Marketplace
behaviors            Name: Behaviours                     Version: 3.0.1      State: Activado                                
Install Method: Marketplace
camerainput          Name: Camera Input                   Version: 2.1.0      State: Instalado / no activado                 
Install Method: Marketplace
positions            Name: Cartography                    Version: 7.0.1      State: Instalado / no activado                 
Install Method: Marketplace
connections          Name: Connections                    Version: 11.0.1     State: Instalado / no activado                 
Install Method: Marketplace
costs                Name: Costs                          Version: 3.0.3      State: Instalado / no activado                 
Install Method: Marketplace
dashboard            Name: Dashboard                      Version: 1.0.3      State: Activado                                
Install Method: Manual
datainjection        Name: Data injection                 Version: 2.15.1     State: Activado                                
Install Method: Marketplace
archidata            Name: Data structures                Version: 1.0.16     State: No instalado                            
Install Method: Marketplace
archimap             Name: Diagrams                       Version: 3.3.7      State: Instalado / no activado                 
Install Method: Marketplace
manageentities       Name: Entities portal                Version: 4.1.2      State: Instalado / no activado                 
Install Method: Marketplace
formcreator          Name: Formcreator End-of-Life Update Version: 3.0.0      State: Activado                                
Install Method: Marketplace
gantt                Name: gantt                          Version: 1.2.0      State: Activado                                
Install Method: Marketplace
genericobject        Name: Generic Objects End-of-Life Up Version: 3.0.0      State: Activado                                
Install Method: Marketplace
glpiinventory        Name: GLPI Inventory                 Version: 1.6.0      State: Activado                                
Install Method: Marketplace
resources            Name: Human Resources                Version: 4.0.2      State: Actualizar                              
Install Method: Marketplace
addressing           Name: IP Addressing                  Version: 3.1.0      State: Instalado / no activado                 
Install Method: Marketplace
itilcategorygroups   Name: ItilCategory Groups            Version: 2.6.0      State: Instalado / no activado                 
Install Method: Marketplace
metademands          Name: Meta-Demands                   Version: 3.5.3      State: Activado                                
Install Method: Marketplace
mreporting           Name: More Reporting                 Version: 1.9.1      State: Activado                                
Install Method: Marketplace
moreticket           Name: More ticket                    Version: 1.8.0      State: Activado                                
Install Method: Marketplace
mydashboard          Name: My Dashboard                   Version: 2.2.2      State: Instalado / no activado                 
Install Method: Marketplace
oauthimap            Name: OAuth IMAP                     Version: 1.5.0      State: Instalado / no activado                 
Install Method: Marketplace
order                Name: Orders management              Version: 2.12.1     State: Instalado / no activado                 
Install Method: Marketplace
additionalalerts     Name: Others alerts                  Version: 3.0.1      State: Activado                                
Install Method: Marketplace
pdf                  Name: Print to pdf                   Version: 4.1.1      State: Instalado / no activado                 
Install Method: Marketplace
printercounters      Name: Printer counters               Version: 2.0.1      State: Instalado / no activado                 
Install Method: Marketplace
protocolsmanager     Name: Protocols manager              Version: 1.5.3.2    State: Instalado / no activado                 
Install Method: Manual
purchaserequest      Name: Purchase request               Version: 3.1.1      State: Instalado / no activado                 
Install Method: Marketplace
releases             Name: Releases                       Version: 2.1.1      State: Instalado / no activado                 
Install Method: Marketplace
reports              Name: Reports                        Version: 1.16.0     State: Instalado / no activado                 
Install Method: Marketplace
room                 Name: Rooms                          Version: 3.1.4      State: Activado                                
Install Method: Manual
screenshot           Name: Screenshot                     Version: 2.0.5      State: Instalado / no activado                 
Install Method: Marketplace
singlesignon         Name: Single Sign-on                 Version: 1.3.3      State: Instalado / no activado                 
Install Method: Manual
stab                 Name: Split Timeline Action Buttons  Version: 2.0.0      State: Activado                                
Install Method: Marketplace
statecheck           Name: Statecheck Rules               Version: 2.4.7      State: Instalado / no activado                 
Install Method: Marketplace
manufacturersimports Name: Suppliers imports              Version: 3.1.1      State: Instalado / no activado                 
Install Method: Marketplace
tag                  Name: Tag Management                 Version: 2.13.0     State: Activado                                
Install Method: Marketplace
taskdrop             Name: TaskDrop                       Version: 2.1.0      State: Instalado / no activado                 
Install Method: Marketplace
tasklists            Name: Tasks list                     Version: 2.1.1      State: Activado                                
Install Method: Marketplace
ticketfilter         Name: Ticketfilter                   Version: 1.2.0      State: Instalado / no activado                 
Install Method: Marketplace
timelineticket       Name: Timeline of tickets            Version: 10.0+1.2   State: Instalado / no activado                 
Install Method: Marketplace
treeview             Name: Tree view                      Version: 1.20.0     State: Instalado / no activado                 
Install Method: Marketplace
webresources         Name: Web Resources                  Version: 2.0.4      State: Instalado / no activado                 
Install Method: Marketplace
webhook              Name: Webhooks                       Version: 1.0.20     State: Instalado / no activado                 
Install Method: Marketplace
yagp                 Name: YAGP                           Version: 2.3.1      State: Instalado / no activado                 
Install Method: Marketplace</pre></details>

### Anything else?

We need access to the previous submitted forms because we use it for evidence for audits ISO/IATF, we did registered all the maintenance for the computers.

there are the migrated forms:
<img width="1711" height="392" alt="Image" src="https://github.com/user-attachments/assets/1f9aa6be-e1b9-484c-bf4b-5c8759111634" />

The following image shows the submenu for each form. Adding a section to view submitted forms would be helpful, as the current system configuration only generates form submissions to record scheduled maintenance on equipment within a specific period, without creating tickets:
<img width="1731" height="790" alt="Image" src="https://github.com/user-attachments/assets/cb74b97d-5374-4ec4-b9c7-0311284c99a9" />

This is the migration status of my forms; we have migrated the forms, but it should be noted that we still cannot access the submitted forms that were created prior to the migration/update:

<img width="1897" height="910" alt="Image" src="https://github.com/user-attachments/assets/cca37da3-e8b4-43f5-8b8d-0f7d9edcbc58" />

i hope can help us with this "issue", i think GLPI is great system with a huge potential, we had used it from at least 5-6 years ago.

if you need more information let me know.

thanks in advance.

regards.


Discussion: In fact, you can't see the answers to a test form either. Is there any way to see the answers?
I would also like to help with the solution. GLPI is the best solution for tickets and inventory on the market. If you would like to run any tests, we would be happy to do so. Thank you!
Many issues have been fixed in versions 11.0.1 and 11.0.2 on forms migration. Please first try to update your v10 database with latest stable release.
At this time, we have version 11.0.2 installed.
I updated from 11.0.0 to 11.0.2 but still can't found an option where can see the submitted forms previous the migration. If you need additional information, let me know.


This data was not taken into account by the migration, I'll look into fixing that so it is corrected for users that have not yet migrated.

For people that have already migrated, they'll need to manually update their database (maybe we can make a small script to make it easier for them).

-----

Personal notes for later:

The data that need to be updated can be found here:

```sql
select ti.id, ti.itemtype, ti.items_id, fa.name, fa.plugin_formcreator_forms_id from glpi_items_tickets ti JOIN glpi_plugin_formcreator_formanswers fa on fa.id = ti.items_id where ti.itemtype = 'PluginFormcreatorFormAnswer';
```

<img width="858" height="125" alt="Image" src="https://github.com/user-attachments/assets/8dbc634f-7690-45f1-86ff-deb5b097260f" />

The `itemtype` must be updated to `Glpi\Form\Form` and the `items_id` to the id of the migrated form.



Fix (patch):
diff --git a/src/Glpi/Form/Migration/FormMigration.php b/src/Glpi/Form/Migration/FormMigration.php
index b1dd729fd7e..940bc8c2d23 100644
--- a/src/Glpi/Form/Migration/FormMigration.php
+++ b/src/Glpi/Form/Migration/FormMigration.php
@@ -35,6 +35,7 @@
 namespace Glpi\Form\Migration;
 
 use AbstractRightsDropdown;
+use Change_Item;
 use DBmysql;
 use DBmysqlIterator;
 use Entity;
@@ -79,6 +80,8 @@
 use Glpi\ItemTranslation\CldrLanguage;
 use Glpi\Message\MessageType;
 use Glpi\Migration\AbstractPluginMigration;
+use Item_Problem;
+use Item_Ticket;
 use LogicException;
 use Override;
 use Throwable;
@@ -373,6 +376,9 @@ protected function validatePrerequisites(): bool
             'glpi_plugin_formcreator_targets_actors' => [
                 'id', 'itemtype', 'items_id', 'actor_role', 'actor_type', 'actor_value', 'use_notification', 'uuid',
             ],
+            'glpi_plugin_formcreator_formanswers' => [
+                'id', 'plugin_formcreator_forms_id',
+            ],
         ];
 
         return $this->checkDbFieldsExists($formcreator_schema);
@@ -396,6 +402,15 @@ protected function processMigration(): bool
             'configs' => $this->countRecords('glpi_plugin_formcreator_entityconfigs', [
                 'replace_helpdesk' => [-2, 2],
             ]),
+            'items_tickets_relations' => $this->countRecords('glpi_items_tickets', [
+                'itemtype' => 'PluginFormcreatorFormAnswer',
+            ]),
+            'changes_items_relations' => $this->countRecords('glpi_changes_items', [
+                'itemtype' => 'PluginFormcreatorFormAnswer',
+            ]),
+            'items_problems_relations' => $this->countRecords('glpi_items_problems', [
+                'itemtype' => 'PluginFormcreatorFormAnswer',
+            ]),
         ];
 
         // Set total progress steps
@@ -417,6 +432,7 @@ protected function processMigration(): bool
         $this->processMigrationOfVisibilityConditions();
         $this->processMigrationOfValidationConditions();
         $this->processMigrationOfConfigs();
+        $this->processMigrationOfITILObjectsRelations();
 
         $this->progress_indicator?->setProgressBarMessage('');
         $this->progress_indicator?->finish();
@@ -1977,6 +1993,94 @@ private function processMigrationOfConfigs(): void
         }
     }
 
+    private function processMigrationOfITILObjectsRelations(): void
+    {
+        $this->updateProgressWithMessage(__('Updating relations between forms and ITIL objects...'));
+
+        // Migrate Item_Ticket relations
+        $this->migrateITILObjectRelations(
+            'glpi_items_tickets',
+            'tickets_id',
+            Item_Ticket::class
+        );
+
+        // Migrate Change_Item relations
+        $this->migrateITILObjectRelations(
+            'glpi_changes_items',
+            'changes_id',
+            Change_Item::class
+        );
+
+        // Migrate Item_Problem relations
+        $this->migrateITILObjectRelations(
+            'glpi_items_problems',
+            'problems_id',
+            Item_Problem::class
+        );
+    }
+
+    /**
+     * Migrate ITIL object relations from FormCreator to GLPI forms
+     *
+     * @param string $table The source table name (e.g., 'glpi_items_tickets')
+     * @param string $itil_fk The foreign key field for the ITIL object (e.g., 'tickets_id')
+     * @param class-string $relation_class The relation class to use (e.g., Item_Ticket::class)
+     */
+    private function migrateITILObjectRelations(
+        string $table,
+        string $itil_fk,
+        string $relation_class
+    ): void {
+        $formanswers_links = $this->db->request([
+            'SELECT' => [
+                "$table.id",
+                "$table.$itil_fk",
+                'glpi_plugin_formcreator_formanswers.plugin_formcreator_forms_id',
+            ],
+            'FROM' => $table,
+            'JOIN' => [
+                'glpi_plugin_formcreator_formanswers' => [
+                    'ON' => [
+                        $table                                => 'items_id',
+                        'glpi_plugin_formcreator_formanswers' => 'id',
+                    ],
+                ],
+                'glpi_plugin_formcreator_forms' => [
+                    'ON' => [
+                        'glpi_plugin_formcreator_formanswers' => 'plugin_formcreator_forms_id',
+                        'glpi_plugin_formcreator_forms'       => 'id',
+                    ],
+                ],
+            ],
+            'WHERE' => [
+                "$table.itemtype" => 'PluginFormcreatorFormAnswer',
+            ] + $this->getFormWhereCriteria(),
+        ]);
+
+        foreach ($formanswers_links as $formanswers_link) {
+            $form_id = $this->validateItemExists(
+                'PluginFormcreatorForm',
+                $formanswers_link['plugin_formcreator_forms_id']
+            );
+
+            $this->importItem(
+                $relation_class,
+                [
+                    'itemtype' => Form::class,
+                    'items_id' => $form_id,
+                    $itil_fk   => $formanswers_link[$itil_fk],
+                ],
+                [
+                    'itemtype' => Form::class,
+                    'items_id' => $form_id,
+                    $itil_fk   => $formanswers_link[$itil_fk],
+                ]
+            );
+
+            $this->progress_indicator?->advance();
+        }
+    }
+
     /**
      * Update progress indicator with message
      *