Page MenuHomePhabricator

D20152.diff
No OneTemporary

D20152.diff

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

Mime Type
text/plain
Expires
Mon, May 13, 9:35 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6275693
Default Alt Text
D20152.diff (1 KB)

Event Timeline