Page MenuHomePhabricator

DifferentialDoorkeeperRevisionFeedStoryPublisher incorrectly detects object creation/closure
Open, Needs TriagePublic

Description

Currently DifferentialDoorkeeperRevisionFeedStoryPublisher:isStoryAboutObjectCreation and DifferentialDoorkeeperRevisionFeedStoryPublisher:isStoryAboutObjectClosure methods (see https://secure.phabricator.com/diffusion/P/browse/master/src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php;1df321bf00a172a6fb13852f815a168760585baa$10-23) incorrectly detect new revision status based on story data value, which nobody really populates:

$story = $this->getFeedStory();
$action = $story->getStoryData()->getValue('action');

I think instead we should look at new value of status change transaction like so:

$story = $this->getFeedStory();
$xaction = $story->getPrimaryTransaction();

if ($xaction->getTransactionType() == DifferentialTransaction::TYPE_ACTION) {
  $action = $xaction->getNewValue();
}

Currently only Asana feed story publisher uses these methods.

Event Timeline

aik099 raised the priority of this task from to Needs Triage.
aik099 updated the task description. (Show Details)
aik099 added a project: Differential.
aik099 added a subscriber: aik099.