Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15421819
D20152.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20152.id.diff
View Options
diff --git a/src/applications/differential/query/DifferentialRevisionQuery.php b/src/applications/differential/query/DifferentialRevisionQuery.php
--- a/src/applications/differential/query/DifferentialRevisionQuery.php
+++ b/src/applications/differential/query/DifferentialRevisionQuery.php
@@ -214,6 +214,10 @@
return $this;
}
+ public function withDraftAuthors($draft_authors) {
+ $this->draftAuthors = $draft_authors;
+ return $this;
+ }
/**
* Set whether or not the query should load the active diff for each
@@ -598,9 +602,9 @@
if ($this->draftAuthors) {
$joins[] = qsprintf(
$conn,
- 'JOIN %T has_draft ON has_draft.srcPHID = r.phid
+ 'JOIN %T has_draft ON has_draft.src = r.phid
AND has_draft.type = %s
- AND has_draft.dstPHID IN (%Ls)',
+ AND has_draft.dst IN (%Ls)',
PhabricatorEdgeConfig::TABLE_NAME_EDGE,
PhabricatorObjectHasDraftEdgeType::EDGECONST,
$this->draftAuthors);
diff --git a/src/applications/differential/query/DifferentialRevisionSearchEngine.php b/src/applications/differential/query/DifferentialRevisionSearchEngine.php
--- a/src/applications/differential/query/DifferentialRevisionSearchEngine.php
+++ b/src/applications/differential/query/DifferentialRevisionSearchEngine.php
@@ -51,6 +51,10 @@
$map['createdEnd']);
}
+ if ($map['draftAuthors'] !== null) {
+ $query->withDraftAuthors($map['draftAuthors']);
+ }
+
return $query;
}
@@ -100,6 +104,12 @@
->setKey('createdEnd')
->setDescription(
pht('Find revisions created at or before a particular time.')),
+ id(new PhabricatorUsersSearchField())
+ ->setLabel(pht('Drafted Comment Authors'))
+ ->setKey('draftAuthors')
+ ->setIsHidden(true)
+ ->setDescription(
+ pht('Find revisions with draft comments from specific authors.')),
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 23, 2:24 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7466490
Default Alt Text
D20152.id.diff (1 KB)
Attached To
Mode
D20152: Expose DifferentialRevisionQuery's ability to search for revisions with draft authors
Attached
Detach File
Event Timeline
Log In to Comment