@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Respect subject prefix configuration for Asana sync and include line count

Summary:
Ref T2852.

- Respect the existing setting for `"[Differential]"`.
- Show `[Request, X lines]` to make this more similar to the email.

Test Plan:
Sync'd to asana and got a task with the right subject:

{F49950}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2852

Differential Revision: https://secure.phabricator.com/D6439

+13 -3
+13 -3
src/applications/doorkeeper/worker/DoorkeeperFeedWorkerAsana.php
··· 89 89 90 90 private function getAsanaTaskData($object) { 91 91 $revision = $object; 92 + $prefix = $this->getTitlePrefix($object); 93 + $title = $revision->getTitle(); 94 + $lines = pht( 95 + '[Request, %d lines]', 96 + new PhutilNumber($object->getLineCount())); 92 97 93 - $name = '[Differential] D'.$revision->getID().': '.$revision->getTitle(); 98 + $name = $prefix.' '.$lines.' D'.$revision->getID().': '.$title; 94 99 $uri = PhabricatorEnv::getProductionURI('/D'.$revision->getID()); 95 100 96 101 $notes = array( ··· 120 125 121 126 private function getAsanaSubtaskData($object) { 122 127 $revision = $object; 128 + $prefix = $this->getTitlePrefix($object); 123 129 124 - $name = '[Differential] Review Request'; 130 + $name = $prefix.' Review Request'; 125 131 $uri = PhabricatorEnv::getProductionURI('/D'.$revision->getID()); 126 132 127 133 $notes = array( ··· 133 139 $notes = implode("\n\n", $notes); 134 140 135 141 return array( 136 - 'name' => '[Differential] Review Request', 142 + 'name' => $prefix.' Review Request', 137 143 'notes' => $notes, 138 144 ); 139 145 } ··· 609 615 public function getWaitBeforeRetry(PhabricatorWorkerTask $task) { 610 616 $count = $task->getFailureCount(); 611 617 return (5 * 60) * pow(8, $count); 618 + } 619 + 620 + public function getTitlePrefix($object) { 621 + return PhabricatorEnv::getEnvConfig('metamta.differential.subject-prefix'); 612 622 } 613 623 614 624 }