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

Herald - print out rule monogram rather than rule phid on transcript controller

Summary: Fixes T4632.

Test Plan: viewed a transcript for rule x which depends on rule y and noted "rule y" printed out rather than "PHID-BLAH-BLAH"

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4632

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

+25 -10
+25 -10
src/applications/herald/controller/HeraldTranscriptController.php
··· 112 112 } 113 113 114 114 protected function renderConditionTestValue($condition, $handles) { 115 - $value = $condition->getTestValue(); 115 + switch ($condition->getFieldName()) { 116 + case HeraldAdapter::FIELD_RULE: 117 + $value = array($condition->getTestValue()); 118 + break; 119 + default: 120 + $value = $condition->getTestValue(); 121 + break; 122 + } 123 + 116 124 if (!is_scalar($value) && $value !== null) { 117 125 foreach ($value as $key => $phid) { 118 126 $handle = idx($handles, $phid); ··· 191 199 $condition_xscripts); 192 200 } 193 201 foreach ($condition_xscripts as $condition_xscript) { 194 - $value = $condition_xscript->getTestValue(); 195 - // TODO: Also total hacks. 196 - if (is_array($value)) { 197 - foreach ($value as $phid) { 198 - if ($phid) { // TODO: Probably need to make sure this "looks like" a 199 - // PHID or decrease the level of hacks here; this used 200 - // to be an is_numeric() check in Facebook land. 201 - $phids[] = $phid; 202 + switch ($condition_xscript->getFieldName()) { 203 + case HeraldAdapter::FIELD_RULE: 204 + $phids[] = $condition_xscript->getTestValue(); 205 + break; 206 + default: 207 + $value = $condition_xscript->getTestValue(); 208 + // TODO: Also total hacks. 209 + if (is_array($value)) { 210 + foreach ($value as $phid) { 211 + if ($phid) { // TODO: Probably need to make sure this 212 + // "looks like" a PHID or decrease the level of hacks here; 213 + // this used to be an is_numeric() check in Facebook land. 214 + $phids[] = $phid; 215 + } 216 + } 202 217 } 203 - } 218 + break; 204 219 } 205 220 } 206 221