@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 parsing of "Reviewed By" field

Summary: In the Message parser, we read this field and expect to get an array of PHIDs out of it. Currently, we get a string. Instead, get an array of PHIDs.

Test Plan: Wrote a message like "Fixes Tnnn" with "Reviewed by: duck", and saw no more parse error during message parsing.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: aran, epriestley

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

+15 -1
+5 -1
src/applications/differential/customfield/DifferentialCustomField.php
··· 51 51 return array(); 52 52 } 53 53 54 - protected function parseObjectList($value, array $types) { 54 + protected function parseObjectList( 55 + $value, 56 + array $types, 57 + $allow_partial = false) { 55 58 return id(new PhabricatorObjectListQuery()) 56 59 ->setViewer($this->getViewer()) 57 60 ->setAllowedTypes($types) 58 61 ->setObjectList($value) 62 + ->setAllowPartialResults($allow_partial) 59 63 ->execute(); 60 64 } 61 65
+10
src/applications/differential/customfield/DifferentialReviewedByField.php
··· 51 51 return true; 52 52 } 53 53 54 + public function parseValueFromCommitMessage($value) { 55 + return $this->parseObjectList( 56 + $value, 57 + array( 58 + PhabricatorPeoplePHIDTypeUser::TYPECONST, 59 + PhabricatorProjectPHIDTypeProject::TYPECONST, 60 + ), 61 + $allow_partial = true); 62 + } 63 + 54 64 public function getRequiredHandlePHIDsForCommitMessage() { 55 65 return $this->getValue(); 56 66 }