mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
Set user on auxiliary fields before validating them on template workflow
Summary: Some fields need this data in some circumstances in order to validate -- see D1153. Test Plan: Ran "arc diff" against local, no longer got an exception for access of this field from the 'Reviewers' validator. Reviewers: btrahan Reviewed By: btrahan CC: aran, btrahan Differential Revision: 1160
This commit is contained in:
parent
8f5e28bf59
commit
10cc5f2660
2 changed files with 6 additions and 0 deletions
|
@ -69,8 +69,13 @@ class DifferentialRevisionEditor {
|
||||||
$aux_fields = DifferentialFieldSelector::newSelector()
|
$aux_fields = DifferentialFieldSelector::newSelector()
|
||||||
->getFieldSpecifications();
|
->getFieldSpecifications();
|
||||||
|
|
||||||
|
$user = id(new PhabricatorUser())->loadOneWhere(
|
||||||
|
'phid = %s',
|
||||||
|
$this->actorPHID);
|
||||||
|
|
||||||
foreach ($aux_fields as $key => $aux_field) {
|
foreach ($aux_fields as $key => $aux_field) {
|
||||||
$aux_field->setRevision($revision);
|
$aux_field->setRevision($revision);
|
||||||
|
$aux_field->setUser($user);
|
||||||
if (!$aux_field->shouldAppearOnCommitMessage()) {
|
if (!$aux_field->shouldAppearOnCommitMessage()) {
|
||||||
unset($aux_fields[$key]);
|
unset($aux_fields[$key]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ phutil_require_module('phabricator', 'applications/feed/publisher');
|
||||||
phutil_require_module('phabricator', 'applications/herald/adapter/differential');
|
phutil_require_module('phabricator', 'applications/herald/adapter/differential');
|
||||||
phutil_require_module('phabricator', 'applications/herald/engine/engine');
|
phutil_require_module('phabricator', 'applications/herald/engine/engine');
|
||||||
phutil_require_module('phabricator', 'applications/herald/storage/transcript/base');
|
phutil_require_module('phabricator', 'applications/herald/storage/transcript/base');
|
||||||
|
phutil_require_module('phabricator', 'applications/people/storage/user');
|
||||||
phutil_require_module('phabricator', 'applications/phid/handle/data');
|
phutil_require_module('phabricator', 'applications/phid/handle/data');
|
||||||
phutil_require_module('phabricator', 'applications/search/index/indexer/differential');
|
phutil_require_module('phabricator', 'applications/search/index/indexer/differential');
|
||||||
phutil_require_module('phabricator', 'infrastructure/daemon/timeline/storage/event');
|
phutil_require_module('phabricator', 'infrastructure/daemon/timeline/storage/event');
|
||||||
|
|
Loading…
Reference in a new issue