From 7de2fae15611f1e104d631df19555edeb695d3c7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 9 Aug 2016 18:22:00 -0700 Subject: [PATCH] Link Herald rules to rule detail pages in Herald transcripts Summary: Fixes T9410. Depends on D16382. Since all users can now view all Herald rules, we can link them in the transcripts. Test Plan: Viewed a transcript, clicked rule names, reviewed rules. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9410 Differential Revision: https://secure.phabricator.com/D16383 --- .../herald/controller/HeraldTranscriptController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/applications/herald/controller/HeraldTranscriptController.php b/src/applications/herald/controller/HeraldTranscriptController.php index e15c7ed52c..a9509beb33 100644 --- a/src/applications/herald/controller/HeraldTranscriptController.php +++ b/src/applications/herald/controller/HeraldTranscriptController.php @@ -249,9 +249,13 @@ final class HeraldTranscriptController extends HeraldController { foreach ($rule_xscripts as $rule_xscript) { $rule_id = $rule_xscript->getRuleID(); + $rule_monogram = pht('H%d', $rule_id); + $rule_uri = '/'.$rule_monogram; + $rule_item = id(new PHUIObjectItemView()) - ->setObjectName(pht('H%d', $rule_id)) - ->setHeader($rule_xscript->getRuleName()); + ->setObjectName($rule_monogram) + ->setHeader($rule_xscript->getRuleName()) + ->setHref($rule_uri); if (!$rule_xscript->getResult()) { $rule_item->setDisabled(true);