Differential D14073 Diff 34742 src/applications/differential/customfield/DifferentialJIRAIssuesField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/customfield/DifferentialJIRAIssuesField.php
| Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | public function getApplicationTransactionTitle( | ||||
| $add = array_diff($new, $old); | $add = array_diff($new, $old); | ||||
| $rem = array_diff($old, $new); | $rem = array_diff($old, $new); | ||||
| $author_phid = $xaction->getAuthorPHID(); | $author_phid = $xaction->getAuthorPHID(); | ||||
| if ($add && $rem) { | if ($add && $rem) { | ||||
| return pht( | return pht( | ||||
| '%s updated JIRA issue(s): added %d %s; removed %d %s.', | '%s updated JIRA issue(s): added %d %s; removed %d %s.', | ||||
| $xaction->renderHandleLink($author_phid), | $xaction->renderHandleLink($author_phid), | ||||
| new PhutilNumber(count($add)), | phutil_count($add), | ||||
| implode(', ', $add), | implode(', ', $add), | ||||
| new PhutilNumber(count($rem)), | phutil_count($rem), | ||||
| implode(', ', $rem)); | implode(', ', $rem)); | ||||
| } else if ($add) { | } else if ($add) { | ||||
| return pht( | return pht( | ||||
| '%s added %d JIRA issue(s): %s.', | '%s added %d JIRA issue(s): %s.', | ||||
| $xaction->renderHandleLink($author_phid), | $xaction->renderHandleLink($author_phid), | ||||
| new PhutilNumber(count($add)), | phutil_count($add), | ||||
| implode(', ', $add)); | implode(', ', $add)); | ||||
| } else if ($rem) { | } else if ($rem) { | ||||
| return pht( | return pht( | ||||
| '%s removed %d JIRA issue(s): %s.', | '%s removed %d JIRA issue(s): %s.', | ||||
| $xaction->renderHandleLink($author_phid), | $xaction->renderHandleLink($author_phid), | ||||
| new PhutilNumber(count($rem)), | phutil_count($rem), | ||||
| implode(', ', $rem)); | implode(', ', $rem)); | ||||
| } | } | ||||
| return parent::getApplicationTransactionTitle($xaction); | return parent::getApplicationTransactionTitle($xaction); | ||||
| } | } | ||||
| public function applyApplicationTransactionExternalEffects( | public function applyApplicationTransactionExternalEffects( | ||||
| PhabricatorApplicationTransaction $xaction) { | PhabricatorApplicationTransaction $xaction) { | ||||
| ▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines | |||||