diff --git a/CHANGELOG.md b/CHANGELOG.md index a57ea7bf..0204847f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fix form submission error when a multiple dropdown field question is left empty - Fix search criterion value on multiple dropdown fields being reset after a search, which emptied the criterion when sorting or paging results +- Fix GenericObject migration error message to name the required 3.0.x version ## [1.24.7] - 2026-10-28 diff --git a/inc/migration.class.php b/inc/migration.class.php index f15d088a..cac1b166 100644 --- a/inc/migration.class.php +++ b/inc/migration.class.php @@ -272,8 +272,9 @@ public static function getGenericObjectTypes(): array // Check GenericObject version $genericobject_info = Plugin::getInfo('genericobject'); if (version_compare($genericobject_info['version'] ?? '0', '3.0.0', '<')) { + // GitHub "latest" release is the GLPI 10 branch (2.14.x), so 3.0.x must be named explicitly. throw new RuntimeException( - 'GenericObject plugin cannot be migrated. Please update it to the latest version.', + 'GenericObject plugin cannot be migrated: version 3.0.x is required. Please install the latest 3.0.x release.', ); } diff --git a/tests/Units/FieldGenericObjectMigrationTest.php b/tests/Units/FieldGenericObjectMigrationTest.php index 1009f51c..e69bdb1d 100644 --- a/tests/Units/FieldGenericObjectMigrationTest.php +++ b/tests/Units/FieldGenericObjectMigrationTest.php @@ -101,6 +101,7 @@ public function testMigrationGuardTriggersWhenGenericobjectFieldsExist(): void $this->fail('Expected RuntimeException was not thrown.'); } catch (RuntimeException $runtimeException) { $this->assertStringContainsString('GenericObject plugin cannot be migrated', $runtimeException->getMessage()); + $this->assertStringContainsString('version 3.0.x is required', $runtimeException->getMessage()); } $this->hasPhpLogRecordThatContains(