Differential - allow setting viewPolicy from web ui during diff creation process
Summary: Fixes T6152, T6237. This introduces a viewPolicy column to the DifferentialDiff, and re-jiggers the DifferentialDiff policy implementation such that things behave as before once associated with a revision, else use the DifferentialDiff policy column value. Test Plan: made a diff with a non-standard view policy and noted that policy was still selected in the revision step. arc lint. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6237, T6152 Differential Revision: https://secure.phabricator.com/D10875
This commit is contained in:
@@ -79,6 +79,13 @@ final class DifferentialRevisionEditController
|
||||
if ($repository_field) {
|
||||
$repository_field->setValue($request->getStr($repo_key));
|
||||
}
|
||||
$view_policy_key = id(new DifferentialViewPolicyField())->getFieldKey();
|
||||
$view_policy_field = idx(
|
||||
$field_list->getFields(),
|
||||
$view_policy_key);
|
||||
if ($view_policy_field) {
|
||||
$view_policy_field->setValue($diff->getViewPolicy());
|
||||
}
|
||||
}
|
||||
|
||||
$validation_exception = null;
|
||||
|
||||
Reference in New Issue
Block a user