Skip to content

NameSchemaService: fix group pattern#758

Open
adriendupuis wants to merge 2 commits into
4.6from
fix-nameschema-parenthesis
Open

NameSchemaService: fix group pattern#758
adriendupuis wants to merge 2 commits into
4.6from
fix-nameschema-parenthesis

Conversation

@adriendupuis
Copy link
Copy Markdown
Contributor

@adriendupuis adriendupuis commented Jun 2, 2026

🎫 Issue IBX-8897

Description:

With this fix, parenthesis can be used in name and URL alias patterns.

Before, in <string1> (<string2>) | <datetime1> - <datetime2>, the following "group" was found: <string1> (<string2>) | <datetime1>, but with this fix, nothing is found.

Pattern: <string1> (<string2>) | <datetime1> - <datetime2>
Before: seen as <string1> (EZMETAGROUP_0) | <datetime1> - <datetime2> but with no replacement
After: seen as <string1> (<string2>) | <datetime1> - <datetime2>

Pattern: <empty|(<string1> <string2>)> | (<datetime1>)
Before: seen as <empty|(EZMETAGROUP_0)> | (<datetime1>)
After: seen as <empty|(EZMETAGROUP_0)> | (<datetime1>) (no change, still as expected)

Before:
image

After:
image

For QA:

Documentation:

$content = $this->buildTestContentObject();
$schemas = [
'<text1> (text)',
'<text1> (<text2>) <text1>',
Copy link
Copy Markdown
Contributor Author

@adriendupuis adriendupuis Jun 2, 2026

Choose a reason for hiding this comment

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

Before, it would fail with

 Array (
-    'eng-GB' => 'one (two) one'
-    'cro-HR' => 'jedan (dva) jedan'
+    'eng-GB' => 'one (EZMETAGROUP_0) one'
+    'cro-HR' => 'jedan (EZMETAGROUP_0) jedan'
 )
 Array (
-    'eng-GB' => ' (two) '
-    'cro-HR' => ' (Dva) '
+    'eng-GB' => ' (EZMETAGROUP_0) '
+    'cro-HR' => ' (EZMETAGROUP_0) '
 )

Before, in `<string1> (<string2>) | <datetime1> - <datetime2>`, the following "group" was found: `<string1> (<string2>) | <datetime1>`, but with this fix, no group found.
@adriendupuis adriendupuis force-pushed the fix-nameschema-parenthesis branch from 69dbf03 to 7fe2628 Compare June 2, 2026 12:39
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

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.

4 participants