Differential D17050 Diff 41015 src/applications/differential/editor/DifferentialRevisionEditEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/editor/DifferentialRevisionEditEngine.php
| Show All 26 Lines | final class DifferentialRevisionEditEngine | ||||
| } | } | ||||
| protected function newEditableObject() { | protected function newEditableObject() { | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| return DifferentialRevision::initializeNewRevision($viewer); | return DifferentialRevision::initializeNewRevision($viewer); | ||||
| } | } | ||||
| protected function newObjectQuery() { | protected function newObjectQuery() { | ||||
| return new DifferentialRevisionQuery(); | return id(new DifferentialRevisionQuery()) | ||||
| ->needReviewerStatus(true); | |||||
| } | } | ||||
| protected function getObjectCreateTitleText($object) { | protected function getObjectCreateTitleText($object) { | ||||
| return pht('Create New Revision'); | return pht('Create New Revision'); | ||||
| } | } | ||||
| protected function getObjectEditTitleText($object) { | protected function getObjectEditTitleText($object) { | ||||
| return pht('Edit Revision: %s', $object->getTitle()); | return pht('Edit Revision: %s', $object->getTitle()); | ||||
| ▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | if ($plan_enabled) { | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Actions performed to verify the behavior of the change.')) | pht('Actions performed to verify the behavior of the change.')) | ||||
| ->setConduitDescription(pht('Update the revision test plan.')) | ->setConduitDescription(pht('Update the revision test plan.')) | ||||
| ->setConduitTypeDescription(pht('New test plan.')) | ->setConduitTypeDescription(pht('New test plan.')) | ||||
| ->setValue($object->getTestPlan()); | ->setValue($object->getTestPlan()); | ||||
| } | } | ||||
| $fields[] = id(new PhabricatorDatasourceEditField()) | $fields[] = id(new PhabricatorDatasourceEditField()) | ||||
| ->setKey('reviewerPHIDs') | |||||
| ->setLabel(pht('Reviewers')) | |||||
| ->setDatasource(new DifferentialReviewerDatasource()) | |||||
| ->setUseEdgeTransactions(true) | |||||
| ->setTransactionType( | |||||
| DifferentialRevisionReviewersTransaction::TRANSACTIONTYPE) | |||||
| ->setDescription(pht('Reviewers for this revision.')) | |||||
| ->setConduitDescription(pht('Change the reviewers for this revision.')) | |||||
| ->setConduitTypeDescription(pht('New reviewers.')) | |||||
| ->setValue($object->getReviewerPHIDsForEdit()); | |||||
| $fields[] = id(new PhabricatorDatasourceEditField()) | |||||
| ->setKey('repositoryPHID') | ->setKey('repositoryPHID') | ||||
| ->setLabel(pht('Repository')) | ->setLabel(pht('Repository')) | ||||
| ->setDatasource(new DiffusionRepositoryDatasource()) | ->setDatasource(new DiffusionRepositoryDatasource()) | ||||
| ->setTransactionType( | ->setTransactionType( | ||||
| DifferentialRevisionRepositoryTransaction::TRANSACTIONTYPE) | DifferentialRevisionRepositoryTransaction::TRANSACTIONTYPE) | ||||
| ->setDescription(pht('The repository the revision belongs to.')) | ->setDescription(pht('The repository the revision belongs to.')) | ||||
| ->setConduitDescription(pht('Change the repository for this revision.')) | ->setConduitDescription(pht('Change the repository for this revision.')) | ||||
| ->setConduitTypeDescription(pht('New repository.')) | ->setConduitTypeDescription(pht('New repository.')) | ||||
| Show All 15 Lines | |||||