diff --git a/packages/typo3-docs-theme/src/Twig/TwigExtension.php b/packages/typo3-docs-theme/src/Twig/TwigExtension.php index 93e841fef..29bfd47fb 100644 --- a/packages/typo3-docs-theme/src/Twig/TwigExtension.php +++ b/packages/typo3-docs-theme/src/Twig/TwigExtension.php @@ -30,6 +30,7 @@ use T3Docs\Typo3DocsTheme\Nodes\ViewHelperNode; use T3Docs\Typo3DocsTheme\Settings\Typo3DocsThemeSettings; use T3Docs\VersionHandling\DefaultInventories; +use T3Docs\VersionHandling\Typo3VersionMapping; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; @@ -400,7 +401,20 @@ public function enrichForgeLink(string $reportButton, RenderContext $renderConte $description = $this->getIssueTitle($renderContext); $reportButton .= urlencode($description); $version = $this->typo3VersionService->getPreferredVersion(); - $reportButton .= '&issue[custom_field_values][4]=' . $version; + switch ($version) { + case 'main': + $reportButton .= '&issue[custom_field_values][4]=' . Typo3VersionMapping::getMajorVersionOfMain()->value; + break; + case '13.4': + $reportButton .= '&issue[custom_field_values][4]=13'; + break; + case '12.4': + $reportButton .= '&issue[custom_field_values][4]=12'; + break; + case '11.5': + $reportButton .= '&issue[custom_field_values][4]=11'; + break; + } } return $reportButton; } diff --git a/packages/typo3-version-handling/src/Typo3VersionMapping.php b/packages/typo3-version-handling/src/Typo3VersionMapping.php index 02925d473..4a7d59b56 100644 --- a/packages/typo3-version-handling/src/Typo3VersionMapping.php +++ b/packages/typo3-version-handling/src/Typo3VersionMapping.php @@ -45,4 +45,9 @@ public static function getAllVersions(): array { return array_map(static fn(Typo3VersionMapping $enumValue) => $enumValue->getVersion(), self::cases()); } + + public static function getMajorVersionOfMain(): Typo3VersionMapping + { + return Typo3VersionMapping::V13; + } } diff --git a/tests/Integration/tests-full/changelog/expected/Changelog/12.0/Breaking-87616-RemovedHookForAlteringPageLinks.html b/tests/Integration/tests-full/changelog/expected/Changelog/12.0/Breaking-87616-RemovedHookForAlteringPageLinks.html index ee83dec7f..b936a422c 100644 --- a/tests/Integration/tests-full/changelog/expected/Changelog/12.0/Breaking-87616-RemovedHookForAlteringPageLinks.html +++ b/tests/Integration/tests-full/changelog/expected/Changelog/12.0/Breaking-87616-RemovedHookForAlteringPageLinks.html @@ -134,7 +134,7 @@ -