From 38e89fbb0867dcd07bed74b9365767290f87f0fd Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Sun, 3 May 2015 10:08:31 +1000 Subject: [PATCH] Add "reopens" prefix Summary: Ref T1751. Add a "reopens" prefix for the "open" status. This allows commits to reopen tasks. Test Plan: Pushed a commit containing `Reopens Tx` and saw `Tx` reopened. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T1751 Differential Revision: https://secure.phabricator.com/D12652 --- .../config/PhabricatorManiphestConfigOptions.php | 6 ++++++ .../ManiphestCustomFieldStatusParserTestCase.php | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php index c766eed655..c2b87629f0 100644 --- a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php +++ b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php @@ -65,6 +65,12 @@ final class PhabricatorManiphestConfigOptions 'open' => array( 'name' => pht('Open'), 'special' => ManiphestTaskStatus::SPECIAL_DEFAULT, + 'prefixes' => array( + 'open', + 'opens', + 'reopen', + 'reopens', + ), ), 'resolved' => array( 'name' => pht('Resolved'), diff --git a/src/applications/maniphest/field/parser/__tests__/ManiphestCustomFieldStatusParserTestCase.php b/src/applications/maniphest/field/parser/__tests__/ManiphestCustomFieldStatusParserTestCase.php index 77d8ddd73e..cd64c23d29 100644 --- a/src/applications/maniphest/field/parser/__tests__/ManiphestCustomFieldStatusParserTestCase.php +++ b/src/applications/maniphest/field/parser/__tests__/ManiphestCustomFieldStatusParserTestCase.php @@ -50,6 +50,16 @@ final class ManiphestCustomFieldStatusParserTestCase 'Fixes t2apps' => array(), 'fixes a bug' => array(), 'Prefixes T2' => array(), + 'Reopens T123' => array( + array( + 'match' => 'Reopens T123', + 'prefix' => 'Reopens', + 'infix' => '', + 'monograms' => array('T123'), + 'suffix' => '', + 'offset' => 0, + ), + ), ); foreach ($map as $input => $expect) {