From 3aabfc7f4deaa47769d31390e21397005b5419e7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 31 Mar 2014 09:27:30 -0700 Subject: [PATCH] Fix JIRA integration from "arc" commit messages Summary: Fixes T4683. This was just a missing method implementation. Also provide a couple of translation things. Test Plan: - Created a revision from the command line with a nonempty `JIRA Issues:` line, via `arc diff`. - Looked at the translation strings. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T4683 Differential Revision: https://secure.phabricator.com/D8656 --- .../DifferentialJIRAIssuesField.php | 8 +++++++ .../PhabricatorBaseEnglishTranslation.php | 23 +++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/applications/differential/customfield/DifferentialJIRAIssuesField.php b/src/applications/differential/customfield/DifferentialJIRAIssuesField.php index dd63675d9b..8ba27ed4ed 100644 --- a/src/applications/differential/customfield/DifferentialJIRAIssuesField.php +++ b/src/applications/differential/customfield/DifferentialJIRAIssuesField.php @@ -264,6 +264,13 @@ final class DifferentialJIRAIssuesField return preg_split('/[\s,]+/', $value, $limit = -1, PREG_SPLIT_NO_EMPTY); } + public function readValueFromCommitMessage($value) { + $this->setValue($value); + return $this; + } + + + public function renderCommitMessageValue(array $handles) { $value = $this->getValue(); if (!$value) { @@ -276,4 +283,5 @@ final class DifferentialJIRAIssuesField return true; } + } diff --git a/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php index 953b13199c..a9f9395358 100644 --- a/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php +++ b/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php @@ -863,10 +863,8 @@ abstract class PhabricatorBaseEnglishTranslation '%s pushed %d commit(s) to %s.' => array( array( - array( - '%s pushed a commit to %3$s.', - '%s pushed %d commits to %s.', - ), + '%s pushed a commit to %3$s.', + '%s pushed %d commits to %s.', ), ), @@ -875,6 +873,23 @@ abstract class PhabricatorBaseEnglishTranslation '%s commits', ), + '%s removed %d JIRA issue(s): %s.' => array( + array( + '%s removed a JIRA issue: %3$s.', + '%s removed JIRA issues: %3$s.', + ), + ), + + '%s added %d JIRA issue(s): %s.' => array( + array( + '%s added a JIRA issue: %3$s.', + '%s added JIRA issues: %3$s.', + ), + ), + + '%s updated JIRA issue(s): added %d %s; removed %d %s.' => + '%s updated JIRA issues: added %3$s; removed %5$s.', + ); }