1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00

Load primary reviewer PHID

Summary: A cursory look at DifferentialReviewer suggests the primary reviewer doesn't actually have to be among the reviewers? Uploading this so bug reporter can patch and see if it helps.

Test Plan: Nope.

Reviewers: epriestley

Reviewed By: epriestley

CC: szymon, aran, Korvin

Maniphest Tasks: T1625

Differential Revision: https://secure.phabricator.com/D3198
This commit is contained in:
Alan Huang 2012-08-08 13:27:52 -07:00
parent 75c647c932
commit 8fbe6347d2

View file

@ -283,10 +283,12 @@ final class DifferentialRevision extends DifferentialDAO {
}
public function getPrimaryReviewer() {
if (!$this->lastReviewerPHID) {
$reviewers = $this->getReviewers();
$last = $this->lastReviewerPHID;
if (!$last || !in_array($last, $reviewers)) {
return head($this->getReviewers());
}
return $this->lastReviewerPHID;
return $last;
}
public function loadReviewedBy() {