@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.

Fix maniphest "create" transactions

Summary: the quotes are 'cuz "create" is inferred. Previously, we inferred on "status", but since we set that on "initializeNewTask" instead infer off "title" (aka "name") like most other apps do. Only hairy tweak was to elevate TYPE_TITLE to the most important of all maniphest transactions, which doesn't actually seem too unreasonable if not correct even? Fixes T4686.

Test Plan: made a new task, used bin/mail, got the right headers (mail vary prefix == created)

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4686

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

+21 -20
+21 -20
src/applications/maniphest/storage/ManiphestTransaction.php
··· 92 92 93 93 public function shouldHide() { 94 94 switch ($this->getTransactionType()) { 95 - case self::TYPE_TITLE: 96 95 case self::TYPE_DESCRIPTION: 97 96 case self::TYPE_PRIORITY: 97 + case self::TYPE_STATUS: 98 98 if ($this->getOldValue() === null) { 99 99 return true; 100 100 } else { ··· 110 110 111 111 public function getActionStrength() { 112 112 switch ($this->getTransactionType()) { 113 + case self::TYPE_TITLE: 114 + return 1.4; 113 115 case self::TYPE_STATUS: 114 116 return 1.3; 115 117 case self::TYPE_OWNER: ··· 170 172 171 173 switch ($this->getTransactionType()) { 172 174 case self::TYPE_TITLE: 173 - return pht('Retitled'); 174 - 175 - case self::TYPE_STATUS: 176 175 if ($old === null) { 177 176 return pht('Created'); 178 177 } 179 178 179 + return pht('Retitled'); 180 + 181 + case self::TYPE_STATUS: 180 182 $action = ManiphestTaskStatus::getStatusActionName($new); 181 183 if ($action) { 182 184 return $action; ··· 245 247 return 'meta-mta'; 246 248 247 249 case self::TYPE_TITLE: 248 - return 'edit'; 249 - 250 - case self::TYPE_STATUS: 251 250 if ($old === null) { 252 251 return 'create'; 253 252 } 254 253 254 + return 'edit'; 255 + 256 + case self::TYPE_STATUS: 255 257 $action = ManiphestTaskStatus::getStatusIcon($new); 256 258 if ($action !== null) { 257 259 return $action; ··· 301 303 302 304 switch ($this->getTransactionType()) { 303 305 case self::TYPE_TITLE: 306 + if ($old === null) { 307 + return pht( 308 + '%s created this task.', 309 + $this->renderHandleLink($author_phid)); 310 + } 304 311 return pht( 305 312 '%s changed the title from "%s" to "%s".', 306 313 $this->renderHandleLink($author_phid), ··· 313 320 $this->renderHandleLink($author_phid)); 314 321 315 322 case self::TYPE_STATUS: 316 - if ($old === null) { 317 - return pht( 318 - '%s created this task.', 319 - $this->renderHandleLink($author_phid)); 320 - } 321 - 322 323 $old_closed = ManiphestTaskStatus::isClosedStatus($old); 323 324 $new_closed = ManiphestTaskStatus::isClosedStatus($new); 324 325 ··· 493 494 494 495 switch ($this->getTransactionType()) { 495 496 case self::TYPE_TITLE: 497 + if ($old === null) { 498 + return pht( 499 + '%s created %s.', 500 + $this->renderHandleLink($author_phid), 501 + $this->renderHandleLink($object_phid)); 502 + } 503 + 496 504 return pht( 497 505 '%s renamed %s from "%s" to "%s".', 498 506 $this->renderHandleLink($author_phid), ··· 507 515 $this->renderHandleLink($object_phid)); 508 516 509 517 case self::TYPE_STATUS: 510 - if ($old === null) { 511 - return pht( 512 - '%s created %s.', 513 - $this->renderHandleLink($author_phid), 514 - $this->renderHandleLink($object_phid)); 515 - } 516 - 517 518 $old_closed = ManiphestTaskStatus::isClosedStatus($old); 518 519 $new_closed = ManiphestTaskStatus::isClosedStatus($new); 519 520