mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +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:
parent
75c647c932
commit
8fbe6347d2
1 changed files with 4 additions and 2 deletions
|
@ -283,10 +283,12 @@ final class DifferentialRevision extends DifferentialDAO {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPrimaryReviewer() {
|
public function getPrimaryReviewer() {
|
||||||
if (!$this->lastReviewerPHID) {
|
$reviewers = $this->getReviewers();
|
||||||
|
$last = $this->lastReviewerPHID;
|
||||||
|
if (!$last || !in_array($last, $reviewers)) {
|
||||||
return head($this->getReviewers());
|
return head($this->getReviewers());
|
||||||
}
|
}
|
||||||
return $this->lastReviewerPHID;
|
return $last;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadReviewedBy() {
|
public function loadReviewedBy() {
|
||||||
|
|
Loading…
Reference in a new issue