Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2900015
D25338.1737266021.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25338.1737266021.diff
View Options
diff --git a/src/applications/differential/editor/DifferentialRevisionEditEngine.php b/src/applications/differential/editor/DifferentialRevisionEditEngine.php
--- a/src/applications/differential/editor/DifferentialRevisionEditEngine.php
+++ b/src/applications/differential/editor/DifferentialRevisionEditEngine.php
@@ -189,7 +189,7 @@
// Don't show the "Author" field when creating a revision using the web
// workflow, since it adds more noise than signal to this workflow.
- if ($this->getIsCreate()) {
+ if ($is_create) {
$author_field->setIsHidden(true);
}
@@ -239,6 +239,12 @@
->setConduitTypeDescription(pht('New reviewers.'))
->setValue($object->getReviewerPHIDsForEdit());
+ // Prefill Repository for example when coming from "Attach To".
+ $repository_phid = $object->getRepositoryPHID();
+ if ($is_create && !$repository_phid && $diff) {
+ $repository_phid = $diff->getRepositoryPHID();
+ }
+
$fields[] = id(new PhabricatorDatasourceEditField())
->setKey('repositoryPHID')
->setLabel(pht('Repository'))
@@ -248,7 +254,7 @@
->setDescription(pht('The repository the revision belongs to.'))
->setConduitDescription(pht('Change the repository for this revision.'))
->setConduitTypeDescription(pht('New repository.'))
- ->setSingleValue($object->getRepositoryPHID());
+ ->setSingleValue($repository_phid);
// This is a little flimsy, but allows "Maniphest Tasks: ..." to continue
// working properly in commit messages until we fully sort out T5873.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 05:53 (1 d, 19 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1131750
Default Alt Text
D25338.1737266021.diff (1 KB)
Attached To
Mode
D25338: Attach Diff to Revision: fix Repository asked twice
Attached
Detach File
Event Timeline
Log In to Comment