diff --git a/src/applications/maniphest/field/parser/__tests__/ManiphestCustomFieldStatusParserTestCase.php b/src/applications/maniphest/field/parser/__tests__/ManiphestCustomFieldStatusParserTestCase.php --- a/src/applications/maniphest/field/parser/__tests__/ManiphestCustomFieldStatusParserTestCase.php +++ b/src/applications/maniphest/field/parser/__tests__/ManiphestCustomFieldStatusParserTestCase.php @@ -60,6 +60,16 @@ 'offset' => 0, ), ), + 'Fixes T123, T456, and T789.' => array( + array( + 'match' => 'Fixes T123, T456, and T789.', + 'prefix' => 'Fixes', + 'infix' => '', + 'monograms' => array('T123', 'T456', 'T789'), + 'suffix' => '', + 'offset' => 0, + ), + ), ); foreach ($map as $input => $expect) { diff --git a/src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php b/src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php --- a/src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php +++ b/src/infrastructure/customfield/parser/PhabricatorCustomFieldMonogramParser.php @@ -24,7 +24,7 @@ '(?:^|\b)'. $prefix_regex. $infix_regex. - '((?:'.$monogram_pattern.'[,\s]*)+)'. + '((?:(and\s+)?'.$monogram_pattern.'[,\s]*)+)'. $suffix_regex. '(?:$|\b)'. '/';