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

Add "Revision test plan" as a Herald field; remove test plan from the "Revision summary" field

Summary:
See PHI844. Ref T13189.

Add "Revision test plan" as an available field for Herald. This is a little niche -- and a little odd because it sticks around even if you fully disable test plans -- but probably broadly reasonable.

The existing "Revision summary" field counterintuitively included the test plan. Separate this out since it's now a separate field and the behavior was weird historic nonsense. I'll note this in the changelog.

Test Plan: Wrote a rule using both fields, verified they generated the expected values.

Reviewers: amckinley

Maniphest Tasks: T13189

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

+23 -4
+2
src/__phutil_library_map__.php
··· 644 644 'DifferentialRevisionStatusTransaction' => 'applications/differential/xaction/DifferentialRevisionStatusTransaction.php', 645 645 'DifferentialRevisionSummaryHeraldField' => 'applications/differential/herald/DifferentialRevisionSummaryHeraldField.php', 646 646 'DifferentialRevisionSummaryTransaction' => 'applications/differential/xaction/DifferentialRevisionSummaryTransaction.php', 647 + 'DifferentialRevisionTestPlanHeraldField' => 'applications/differential/herald/DifferentialRevisionTestPlanHeraldField.php', 647 648 'DifferentialRevisionTestPlanTransaction' => 'applications/differential/xaction/DifferentialRevisionTestPlanTransaction.php', 648 649 'DifferentialRevisionTitleHeraldField' => 'applications/differential/herald/DifferentialRevisionTitleHeraldField.php', 649 650 'DifferentialRevisionTitleTransaction' => 'applications/differential/xaction/DifferentialRevisionTitleTransaction.php', ··· 6004 6005 'DifferentialRevisionStatusTransaction' => 'DifferentialRevisionTransactionType', 6005 6006 'DifferentialRevisionSummaryHeraldField' => 'DifferentialRevisionHeraldField', 6006 6007 'DifferentialRevisionSummaryTransaction' => 'DifferentialRevisionTransactionType', 6008 + 'DifferentialRevisionTestPlanHeraldField' => 'DifferentialRevisionHeraldField', 6007 6009 'DifferentialRevisionTestPlanTransaction' => 'DifferentialRevisionTransactionType', 6008 6010 'DifferentialRevisionTitleHeraldField' => 'DifferentialRevisionHeraldField', 6009 6011 'DifferentialRevisionTitleTransaction' => 'DifferentialRevisionTransactionType',
+1 -4
src/applications/differential/herald/DifferentialRevisionSummaryHeraldField.php
··· 10 10 } 11 11 12 12 public function getHeraldFieldValue($object) { 13 - // NOTE: For historical reasons, this field includes the test plan. We 14 - // could maybe try to fix this some day, but it probably aligns reasonably 15 - // well with user expectation without harming anything. 16 - return $object->getSummary()."\n\n".$object->getTestPlan(); 13 + return $object->getSummary(); 17 14 } 18 15 19 16 protected function getHeraldFieldStandardType() {
+20
src/applications/differential/herald/DifferentialRevisionTestPlanHeraldField.php
··· 1 + <?php 2 + 3 + final class DifferentialRevisionTestPlanHeraldField 4 + extends DifferentialRevisionHeraldField { 5 + 6 + const FIELDCONST = 'differential.revision.test-plan'; 7 + 8 + public function getHeraldFieldName() { 9 + return pht('Revision test plan'); 10 + } 11 + 12 + public function getHeraldFieldValue($object) { 13 + return $object->getTestPlan(); 14 + } 15 + 16 + protected function getHeraldFieldStandardType() { 17 + return self::STANDARD_TEXT; 18 + } 19 + 20 + }