@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 feed story publishing for audit comments

Summary: we need to make sure we should publish to the auditor in a given audit request. write some custom logic for this as it is subtly different than other things like CC.

Test Plan: repro from T2087 produced expected results. further, former auditors who resigned did not get feed stories published.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2087

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

+19 -1
+19 -1
src/applications/audit/editor/PhabricatorAuditCommentEditor.php
··· 270 270 $commit->updateAuditStatus($requests); 271 271 $commit->save(); 272 272 273 - $this->publishFeedStory($comment, array_keys($audit_phids)); 273 + $feed_dont_publish_phids = array(); 274 + foreach ($requests as $request) { 275 + $status = $request->getAuditStatus(); 276 + switch ($status) { 277 + case PhabricatorAuditStatusConstants::RESIGNED: 278 + case PhabricatorAuditStatusConstants::NONE: 279 + case PhabricatorAuditStatusConstants::AUDIT_NOT_REQUIRED: 280 + case PhabricatorAuditStatusConstants::CC: 281 + $feed_dont_publish_phids[$request->getAuditorPHID()] = 1; 282 + break; 283 + default: 284 + unset($feed_dont_publish_phids[$request->getAuditorPHID()]); 285 + break; 286 + } 287 + } 288 + $feed_dont_publish_phids = array_keys($feed_dont_publish_phids); 289 + 290 + $feed_phids = array_diff($requests_phids, $feed_dont_publish_phids); 291 + $this->publishFeedStory($comment, $feed_phids); 274 292 PhabricatorSearchCommitIndexer::indexCommit($commit); 275 293 $this->sendMail($comment, $other_comments, $inline_comments, $requests); 276 294 }